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

Published Sep 15, 2026
·
Updated

fast-uri is a dependency-free RFC 3986 URI parser for Node.js, used by Fastify and ajv. In versions before 2.4.7, from 3.0.0 through 3.1.7, and from 4.0.0 through 4.1.4, fast-uri folds the host to lowercase before it percent-decodes the host, so a percent-encoded uppercase octet such as %41 decodes to a literal A that is never folded. For a scheme-relative reference such as //host there is no scheme, so the host canonicalization that would normally repair this does not run, and parse, normalize, and equal then disagree on the same host. An application that makes a case-sensitive host decision on fast-uri output, for example a host allowlist or denylist that compares the parsed host or uses equal, can be steered past the check with a percent-encoded uppercase octet, and because hostnames are case-insensitive in DNS and HTTP the evading spelling still reaches the host the check meant to gate. The issue is fixed in fast-uri 2.4.7, 3.1.8, and 4.1.5, and users should upgrade to one of those versions or later. As a workaround, compare hosts case-insensitively by lowercasing the parsed host before any allowlist or denylist decision.

Affected Software

1 affected component
npm/fast-uri<2.4.7, >=3.0.0<=3.1.7, >=4.0.0<=4.1.4

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 2.4.7
  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 4.1.5
  4. Compensating control

    Lowercase the parsed host before making any host allowlist or denylist decision, and compare hosts case-insensitively.

Event History

Sep 15, 2026
Data Sourced
via Red Hat·10:42 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which applications are realistically exposed to this issue?

Applications using an affected fast-uri version are exposed if they make security decisions based on parsed hostnames, such as host allowlists or denylists, and compare those hosts case-sensitively or rely on equal. The issue is particularly relevant for scheme-relative URI references such as //host.

2

What does an attacker need to bypass a host-based check?

An attacker needs to supply a URI whose host includes a percent-encoded uppercase octet, such as %41. Because DNS and HTTP treat hostnames case-insensitively, the resulting hostname can still reach the host that the application intended to restrict.

3

Are all fast-uri versions affected?

No. The affected versions are those before 2.4.7, versions from 3.0.0 through 3.1.7, and versions from 4.0.0 through 4.1.4. The issue is fixed in 2.4.7, 3.1.8, and 4.1.5.

4

What can be done if an upgrade cannot be applied immediately?

Lowercase the parsed host before making any allowlist or denylist decision, and compare hosts case-insensitively. This prevents percent-encoded uppercase characters from creating a distinct spelling that bypasses the check.

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