GHSA-hrr3-gc8f-f4qj

Suggest an improvement
Source
https://github.com/advisories/GHSA-hrr3-gc8f-f4qj
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-hrr3-gc8f-f4qj/GHSA-hrr3-gc8f-f4qj.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hrr3-gc8f-f4qj
Aliases
Downstream
CGA (215)
ECHO (1)
MINI (27)
Published
2026-09-29T23:54:25Z
Modified
2026-09-30T00:00:04Z
Severity
  • 4.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
Summary
fast-uri vulnerable to inconsistent host case normalization via percent-encoded octets
Details

Impact

fast-uri folds the host to lowercase before it percent-decodes the host, so a percent-encoded uppercase unreserved octet such as %41 decodes to a literal A that is never folded. For a scheme-relative reference (//host) there is no scheme, so the host canonicalization that repairs this on a scheme-bearing URL does not run. As a result parse, normalize, and equal disagree on the same host: parse("//%41.com").host returns "A.com" while parse("//a.com").host and parse("//A.com").host return "a.com", and equal("//%41.com", "//a.com") is false even though equal("//A.com", "//a.com") is true. An application that makes a case-sensitive host decision on fast-uri output for a scheme-relative reference, for example a host allowlist or denylist that compares parse(url).host or uses fast-uri.equal, can be steered past the check with a percent-encoded uppercase octet. Because a hostname is case-insensitive in DNS and HTTP routing, the evading spelling reaches the same host the check meant to gate, so the effect is check evasion rather than reaching a different registrable host.

Patches

Upgrade to fast-uri 4.1.5, 3.1.8, or 2.4.7.

Workarounds

Compare hosts case-insensitively (lowercase the parsed host before any allowlist or denylist decision), or avoid making case-sensitive host decisions on scheme-relative input until upgrading.

Database specific
{
    "cwe_ids":  [
        "CWE-178"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-09-29T23:54:25Z",
    "nvd_published_at":  "2026-09-15T11:17:12Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / fast-uri

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.4.7

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-hrr3-gc8f-f4qj/GHSA-hrr3-gc8f-f4qj.json"

npm / fast-uri

Package

Affected ranges

Type
SEMVER
Events
Introduced
3.0.0
Fixed
3.1.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-hrr3-gc8f-f4qj/GHSA-hrr3-gc8f-f4qj.json"

npm / fast-uri

Package

Affected ranges

Type
SEMVER
Events
Introduced
4.0.0
Fixed
4.1.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-hrr3-gc8f-f4qj/GHSA-hrr3-gc8f-f4qj.json"