Path Equivalencefast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Path Equivalence via the serialize() / normalize() functions, which incorrectly applied RFC 3986 remove_dot_segments to relative-path references. That algorithm is defined only for merged target paths, not for relative references themselves, so normalizing a relative path such as a/../b produced /b (root-relative), x/.. produced /, and ../x produced x. An attacker who can supply a relative URI reference can cause it to resolve to a different resource than intended after normalization, enabling path-traversal-style target substitution.
How to fix Path Equivalence? Upgrade fast-uri to version 2.4.8, 3.1.9, 4.2.3 or higher.
| <2.4.8>=3.0.0 <3.1.9>=4.0.0 <4.2.3 |
Improper Validation of Specified Quantity in Inputfast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Improper Validation of Specified Quantity in Input via canonicalizeHost(), which passes the host directly to new URL('http://' + host) without verifying that the WHATWG parser consumed the entire input as a host. Because the RFC 3986 parser permits @ in the host component, and the WHATWG parser silently strips TAB, LF, and CR, an attacker can supply a URI whose authority is rewritten by the second parser with no error. This allows host spoofing across parse(), normalize(), equal(), and resolve() - for example, parse('http://a@b@evil.com/').host returns 'evil.com' and normalize('http://ev\til.com/p') returns 'http://evil.com/p'.
How to fix Improper Validation of Specified Quantity in Input? Upgrade fast-uri to version 2.4.8, 3.1.9, 4.2.3 or higher.
| >=2.4.2 <2.4.8>=3.1.3 <3.1.9>=4.0.1 <4.2.3 |
Encoding Errorfast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Encoding Error via the decodeValidScheme function, which decoded percent-encoded URI schemes using the deprecated unescape() global (including the JavaScript-only %uXXXX form) before validating them. An attacker can supply a percent-encoded scheme such as %6Aavascript:alert(1) or %u006Aavascript:alert(1), causing normalize() to return a live javascript: URI, resolve() to produce a javascript: URL, and equal() to treat the encoded form as equivalent to the decoded scheme. This enables scheme-confusion attacks, most notably cross-site scripting when the resulting URI is used in a browser navigation or href context.
How to fix Encoding Error? Upgrade fast-uri to version 2.4.8, 3.1.9, 4.2.3 or higher.
| <2.4.8>=3.0.0 <3.1.9>=4.0.0 <4.2.3 |
Path Equivalencefast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Path Equivalence via the serialize(), normalize(), and resolve() functions when called with the non-default option reference: 'suffix' on a reference that has no authority. A bare colon in the first path segment of the emitted relative reference is not escaped, violating RFC 3986 section 3.3/4.2, which causes the output to reparse as an absolute URI with a scheme rather than a relative reference. An attacker who can influence the URI being serialized can exploit this to inject an unintended scheme into the output.
Note: This is only exploitable when the non-default reference: 'suffix' option is explicitly passed to serialize(), normalize(), or resolve().
How to fix Path Equivalence? Upgrade fast-uri to version 2.4.8, 3.1.9, 4.2.3 or higher.
| <2.4.8>=3.0.0 <3.1.9>=4.0.0 <4.2.3 |
Inappropriate Encoding for Output Contextfast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Inappropriate Encoding for Output Context in the mailto parser when handling percent-encoded query field names. An attacker can manipulate email recipients, subjects, or body content by crafting specially formatted mailto URIs that exploit the desynchronization between parsing and serialization. This may result in emails being sent to unintended recipients or with altered content.
How to fix Inappropriate Encoding for Output Context? Upgrade fast-uri to version 4.1.5 or higher.
| |
Encoding Errorfast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Encoding Error in the mailto parser process. An attacker can inject unauthorized recipients or manipulate the subject and body fields by crafting a URI with percent-encoded reserved field names, which are not properly recognized during parsing but are re-emitted as literal field names upon serialization. This can result in attacker-controlled data being silently included in outgoing messages or logs.
How to fix Encoding Error? Upgrade fast-uri to version 4.1.5 or higher.
| |
Improper Handling of Case Sensitivityfast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Improper Handling of Case Sensitivity due to inconsistent normalization in the host component. An attacker can gain unauthorized access to restricted resources or services by submitting a specially crafted URI containing percent-encoded uppercase characters, which may bypass host allowlists or denylists in applications relying on case-sensitive host validation.
How to fix Improper Handling of Case Sensitivity? Upgrade fast-uri to version 2.4.7, 3.1.8, 4.1.5 or higher.
| <2.4.7>=3.0.0 <3.1.8>=4.0.0 <4.1.5 |
Host Confusionfast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Host Confusion in the parse() function, which returns a host that begins with [ but has no closing ], such as [@127.0.0.1, without validating it as an IPv6 literal or canonicalizing it as a domain name, leaving error undefined. An attacker can cause an application to make security decisions on a different host than HTTP clients resolve, defeating SSRF denylists, redirect allowlists, or proxy routing, by supplying a URL whose authority contains an unbalanced bracket. This affects applications that use the host from parse(), normalize(), equal(), or resolve() for access decisions while forwarding the original URL to an HTTP client.
How to fix Host Confusion? Upgrade fast-uri to version 2.4.6, 3.1.7, 4.1.4 or higher.
| >=2.4.5 <2.4.6>=3.1.6 <3.1.7>=4.1.3 <4.1.4 |
Improper Encoding or Escaping of Outputfast-uri is a Dependency-free RFC 3986 URI toolbox
Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output that enables authority injection in the recomposeAuthority function, which escapes the userinfo and host components but concatenates the port field verbatim, so non-digit characters in the port introduce authority delimiters. An attacker can restructure the URI to redirect requests to a server they control by supplying a port value such as @127.0.0.1:8124, which demotes the legitimate host to userinfo and yields http://trusted.example:@127.0.0.1:8124/app. This requires the application to build URIs from separate components and assign untrusted data directly to the port field of an object passed to serialize(), normalize(), or equal(), and ports obtained via parse() are unaffected because parsing validates digit-only values.
How to fix Improper Encoding or Escaping of Output? Upgrade fast-uri to version 2.4.6, 3.1.7, 4.1.4 or higher.
| <2.4.6>=3.0.0 <3.1.7>=4.0.0 <4.1.4 |