REDHAT-BUG-2556008: Medium severity npm/fast-uri vulnerability

Published Oct 20, 2026
·
Updated

fast-uri is a dependency-free RFC 3986 URI parser and serializer for Node.js. In versions from 2.4.2 through 2.4.7, from 3.1.3 through 3.1.8, and from 4.0.1 through 4.2.2, for HTTP-family schemes the canonicalizeHost() function passes the parsed host to the WHATWG URL parser and adopts its hostname without checking that the parser consumed the entire input as a host, so the authority can be silently rewritten: data before an at-sign is dropped and tab, carriage-return, and line-feed characters are stripped, with no error reported. An application that enforces host-based policy such as denylists, loopback filtering, redirect validation, or outbound proxy routing on one representation can then see the canonical host diverge from what it checked, allowing traffic to be steered to an unintended destination. The issue is fixed in fast-uri 2.4.8, 3.1.9, and 4.2.3, and users should upgrade to one of these versions or later. As a workaround, reject an authority that contains more than one at-sign or any tab, carriage-return, or line-feed before calling fast-uri, or treat any non-empty parse error as fatal and compare hosts only from the same parse result.

Affected Software

1 affected component
npm/fast-uri>=2.4.2<=2.4.7, >=3.1.3<=3.1.8, >=4.0.1<=4.2.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.4.8
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.1.9
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 4.2.3
  4. Compensating control

    Before calling fast-uri, reject authorities containing more than one at-sign or any tab, carriage-return, or line-feed; alternatively, treat any non-empty parse error as fatal and compare hosts only from the same parse result.

Event History

Oct 20, 2026
Data Sourced
via Red Hat·07:22 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which applications are realistically exposed to this issue?

Applications using affected fast-uri versions for HTTP-family URIs are exposed when they make security decisions based on a host value, such as denylisting destinations, blocking loopback addresses, validating redirects, or selecting outbound proxy routes. The risk arises when the checked host representation differs from the host produced during canonicalization.

2

What URI input characteristics can trigger the host mismatch?

An authority containing data before an at-sign can be rewritten because the WHATWG URL parser drops that data. Tab, carriage-return, and line-feed characters can also be stripped without an error, allowing the canonical host to differ from the value the application originally evaluated.

3

What can be done if upgrading fast-uri is not immediately possible?

Reject authorities containing more than one at-sign or any tab, carriage-return, or line-feed before calling fast-uri. Alternatively, treat any non-empty parse error as fatal and ensure host comparisons use values from the same parse result.

4

Which versions contain the fix?

The issue is fixed in fast-uri 2.4.8, 3.1.9, and 4.2.3, as well as later versions in those release lines. Affected ranges are 2.4.2 through 2.4.7, 3.1.3 through 3.1.8, and 4.0.1 through 4.2.2.

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