ZeroHour

CVE-2026-84292

large

Host spoofing via unvalidated URI port injection in fast-uri

CVSS 3.1
7.5 high
EPSS
<1%p13
Published
()
Modified
AI analysis

fast-uri serializes the port component of a URI without validating it, so when the authority is recomposed a non-numeric port value containing characters such as '@' or ':' can inject authority delimiters into the string. Applications that build URIs from parts and assign untrusted data to the port component, then call serialize, normalize, or equal in their object forms, can have the intended host demoted to userinfo and the URI's authority silently repointed at an attacker-controlled host. Both fast-uri and Node's built-in URL parser read the recomposed URI back as the attacker's host without error, so re-validating the built URI does not catch the manipulation, enabling host-allowlist bypass, potential credential exposure via the userinfo component, and integrity-only attacks (CVSS 3.1 7.5, C:N/I:H/A:N). Anyone using fast-uri before 2.4.6, from 3.0.0 before 3.1.7, or from 4.0.0 before 4.1.4 who passes untrusted values into the port component is affected. There is no known public proof-of-concept, the issue is not in CISA's KEV catalog, and EPSS estimates only a 0.2% chance of exploitation within 30 days, so it is not currently known to be exploited in the wild.

What to do: Upgrade fast-uri to 2.4.6 (2.x line), 3.1.7 (3.x line), or 4.1.4 (4.x line), where recomposeAuthority rejects any port that is not a digit sequence per RFC 3986; use 'npm ls fast-uri' or lockfile review to find which of your builds pull in vulnerable versions. Until patched, validate that any user-supplied port is purely numeric before assigning it to the port component, and review SSRF or host-allowlist logic that trusts URIs rebuilt from parts with fast-uri or Node's URL parser.

Affected
openjsf fast-uri< 2.4.6 (fixed in 2.4.6)
openjsf fast-uri>= 3.0.0 and < 3.1.7 (fixed in 3.1.7)
openjsf fast-uri>= 4.0.0 and < 4.1.4 (fixed in 4.1.4)
Estimated exposure
large≈ hundreds of thousands of Node.js applications carry an affected fast-uri version (library with multi-million weekly npm downloads) — fast-uri is a widely installed npm library in the Fastify/OpenJS ecosystem and appears as a transitive dependency in a very large number of Node.js projects, but practical exposure is narrower because only applications that assign…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

fast-uri serializes the port component of a URI without validating it. When recomposing the authority, the userinfo and host components are escaped but the port is concatenated verbatim, so a port value that is not a sequence of digits can inject authority delimiters, demoting the intended host to userinfo and pointing the authority at an attacker-controlled host. Both fast-uri and Node's URL read the result back as the attacker's host with no error, so re-validating the built URI does not catch it. This affects applications that build URIs from parts and assign untrusted data to the port component through the serialize, normalize, or equal functions in their object forms. The issue affects fast-uri versions before 2.4.6, from 3.0.0 before 3.1.7, and from 4.0.0 before 4.1.4. It is fixed in 2.4.6, 3.1.7, and 4.1.4, where recomposeAuthority rejects any port that is not a digit sequence per RFC 3986.

Vendors
openjsf
Products
fast-uri
Weakness
CWE-116
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

In the news

No ingested article mentions this CVE yet.