All vulnerabilities
CVE-2026-84292GHSA-qw65-cvwx-89v3

fast-uri vulnerable to authority injection via an unvalidated port in serialize

fast-uri fast-urinpmLibraries & packages
CVSS
7.5High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.24%Chance of exploitation activity in the next 30 days, higher than 14% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in2.4.6Also 3.1.7, 4.1.4GitHub
Published2 Sep 2026Updated 28 Sep 2026CVE List

What fixes it

  • 2.4.6fast-uri, npmGitHubnpm install fast-uri@2.4.6
  • 3.1.7fast-uri, npmGitHubnpm install fast-uri@3.1.7
  • 4.1.4fast-uri, npmGitHubnpm install fast-uri@4.1.4
  • 2.4.6fast-uriCVE List
  • 3.1.7fast-uriCVE List
  • 4.1.4fast-uriCVE List

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Impact

fast-uri serializes the port component of a URI without validating it. When recomposing the authority, fast-uri escapes the userinfo and host components but concatenates the port verbatim, so a port value that is not a sequence of digits can inject authority delimiters. For example, serializing a component whose port is @127.0.0.1:8124 produces http://trusted.example:@127.0.0.1:8124/app, 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 (for example a fixed host from configuration and a port taken from user input or a service record). The same path is reachable through serialize(), normalize(), and equal() in their object forms. A port obtained from parse() is always digits and is not affected.

Patches

This vulnerability has been patched in fast-uri 4.1.4, 3.1.7, and 2.4.6. recomposeAuthority now rejects any port that is not *DIGIT per RFC 3986. All users should upgrade.

Workarounds

If upgrading is not immediately possible, validate the port value against the RFC 3986 grammar (digits only) before passing a component to serialize(), normalize(), or equal(), and reject anything else, for example if (!/^\d*$/.test(String(port))) throw new Error('invalid port').

Text from GitHub Advisory Database

Affected versions 12

  • fast-uri, npm< 2.4.6GitHub
  • fast-uri, npm>= 3.0.0, < 3.1.7GitHub
  • fast-uri, npm>= 4.0.0, < 4.1.4GitHub
  • fast-uriaffected: all versions before 2.4.6CVE List
  • fast-uriunaffected: 2.4.6CVE List
  • fast-uriaffected: 3.0.0 before 3.1.7CVE List
  • fast-uriunaffected: 3.1.7CVE List
  • fast-uriaffected: 4.0.0 before 4.1.4CVE List
  • fast-uriunaffected: 4.1.4CVE List
  • fast-uri, npmfrom first release, fixed in 2.4.6OSV
  • fast-uri, npmfrom 3.0.0, fixed in 3.1.7OSV
  • fast-uri, npmfrom 4.0.0, fixed in 4.1.4OSV

References 8