GHSA-hrr3-gc8f-f4qj: Medium severity npm/fast-uri vulnerability

Published Sep 29, 2026
·
Updated

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.

Affected Software

3 affected componentsFixes available
npm/fast-uri>=4.0.0<4.1.5
4.1.5
npm/fast-uri>=3.0.0<3.1.8
3.1.8
npm/fast-uri<2.4.7
2.4.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/fast-uri to a version that resolves this vulnerability.

    Fixed in 4.1.5
  2. Upgrade

    Upgrade npm/fast-uri to a version that resolves this vulnerability.

    Fixed in 3.1.8
  3. Upgrade

    Upgrade npm/fast-uri to a version that resolves this vulnerability.

    Fixed in 2.4.7
  4. Upgrade

    Upgrade fast-uri to a version that resolves this vulnerability.

    Fixed in 4.1.5
  5. Configuration

    Lowercase the parsed host before any allowlist or denylist decision, or avoid case-sensitive host decisions on scheme-relative input until upgrading.

    Application host validation using fast-uri Host comparison case sensitivity = case-insensitive

Event History

Sep 29, 2026
Advisory Published
via GitHub·11:54 PM
Data Sourced
via GitHub·11:54 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are realistically exposed to this issue?

Applications are exposed if they process scheme-relative references such as //host with fast-uri and make case-sensitive host allowlist or denylist decisions using parse(url).host or fast-uri.equal. The issue can let a percent-encoded uppercase unreserved character bypass that check while DNS and HTTP routing still reach the same hostname.

2

What input does an attacker need to exploit the bypass?

The attacker needs to supply a scheme-relative URL whose hostname contains a percent-encoded uppercase unreserved octet, such as //%41.com. This causes fast-uri to return A.com rather than the lowercase canonical form used for equivalent host spellings.

3

Are ordinary URLs with an explicit scheme affected in the same way?

The described inconsistency is specific to scheme-relative references with no scheme. For scheme-bearing URLs, host canonicalization runs and repairs the case-folding issue.

4

What versions should be used to remediate the issue?

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

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203