GHSA-wjr9-j795-jxcr: Input Validation

Published Oct 23, 2026
·
Updated

Impact

fast-uri versions >= 2.4.2, <= 2.4.7, >= 3.1.3, <= 3.1.8, and >= 4.0.1, <= 4.2.2 can silently rewrite the host of an HTTP-family URL (http, https, ws, wss, or any scheme with domainHost: true). For those schemes canonicalizeHost() passes the parsed host to the WHATWG URL parser and adopts its .hostname without checking that the parser read the whole input as a host. RFC 3986 permits @ inside the host group and the WHATWG parser strips TAB, LF, and CR, so the authority fast-uri reports is rewritten by that second parser with no error set: data before an @ is dropped and whitespace is removed.

For example, fast-uri parses http://a@b@evil.example/ to host evil.example (dropping the b segment), and a host containing a raw TAB, CR, or LF has those characters stripped. equal() then treats a whitespace-smuggled host as the same as the clean one, and resolve() rewrites the authority the same way.

Applications that use fast-uri to enforce host-based policy (denylists, loopback filtering, redirect validation, outbound proxy routing) on one representation, such as the raw input, see a policy/use desync: the canonical host fast-uri returns differs from what was checked, and traffic can be steered to an unintended destination.

Patches

Upgrade to fast-uri 2.4.8, 3.1.9, or 4.2.3.

Workarounds

Reject URIs whose authority contains more than one @, or contains TAB, CR, or LF, before calling fast-uri. Alternatively, treat any non-empty parse(x).error as fatal, and compare hosts only from the same parse() result.

Affected Software

3 affected componentsFixes available
npm/fast-uri>=4.0.1<4.2.3
4.2.3
npm/fast-uri>=3.1.3<3.1.9
3.1.9
npm/fast-uri>=2.4.2<2.4.8
2.4.8

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.2.3
  2. Upgrade

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

    Fixed in 3.1.9
  3. Upgrade

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

    Fixed in 2.4.8
  4. Upgrade

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

    Fixed in 2.4.8
  5. Upgrade

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

    Fixed in 3.1.9
  6. Upgrade

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

    Fixed in 4.2.3
  7. Compensating control

    Before calling fast-uri, reject URIs whose authority contains more than one @ or contains TAB, CR, or LF.

  8. Compensating control

    Treat any non-empty parse(x).error as fatal, and compare hosts only from the same parse() result.

Event History

Oct 23, 2026
Advisory Published
via GitHub·09:37 PM
Data Sourced
via GitHub·09:37 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What does an attacker need to supply to trigger the parsing discrepancy?

The attacker needs control of a URL using http, https, ws, wss, or another scheme configured with domainHost: true. Relevant inputs include authorities with multiple @ characters, such as http://a@b@evil.example/, or hosts containing raw TAB, CR, or LF characters.

2

Which applications are realistically exposed?

Applications are exposed when they use fast-uri to make host-based security decisions on one URL representation and later use the canonicalized, resolved, or compared result. Examples called out include denylist enforcement, loopback filtering, redirect validation, and outbound proxy routing.

3

How can this affect host validation logic?

The host accepted or checked by application policy can differ from the host ultimately canonicalized by fast-uri without an error being set. Data before an @ may be dropped, whitespace may be removed, and equal() can treat a whitespace-smuggled host as equivalent to the clean host.

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