Repository navigation
Update dependency fast-uri to v3.1.9 [SECURITY] - #544
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.1.4→3.1.9fast-uri vulnerable to host confusion via backslash authority introducer
CVE-2026-18446 / GHSA-7p8r-x3mc-p8w7
More information
Details
Impact
fast-uriv4.1.1 and earlier require a literal//to recognize a URI authority, so a reference that uses\\,/\, or\/as the authority introducer (in place of//, after an optional scheme) is parsed with no authority: the sequence and everything after it fold into the path. Node's native WHATWGURL(used byfetch(),undici, and Node'shttp/httpsclients) instead treats\as interchangeable with/for special schemes (http,https,ws,wss,ftp,file), so the two parsers extract different hosts from the same input.For example,
fast-uriresolves\\evil.com/pathagainst basehttps://allowed.com/tohttps://allowed.com/%5C%5Cevil.com/path(confined to the trusted host), while Node's WHATWG URL resolves the same reference tohttps://evil.com/path.Applications that use
fast-urito enforce host-based policy (allowlists, denylists, loopback/SSRF filtering, redirect validation, outbound proxy routing) before passing the same URL into Node's URL orfetch()consumers see a policy/use desync and can be steered to an unintended destination.Patches
Upgrade to
fast-uriv4.1.2, v3.1.5, v2.4.4.Workarounds
None. Upgrade to the patched version.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to server-side request forgery via repeated hostname percent-decoding
CVE-2026-75899 / GHSA-fph4-wmhf-6fwf
More information
Details
Impact
fast-uridecodes a hostname's percent escapes twice in a singlenormalize()orresolve()call: once during parsing and again during authority recomposition. A nested percent-encoded host therefore survives the first decode and is turned into a live destination by the second, sonormalize('http://%256c%256f%2563%2561%256c%2568%256f%2573%2574/')returnshttp://localhost/. Applications that normalize or resolve an untrusted URI before an SSRF check, redirect validation, or host allowlist can be steered to a different destination, including internal addresses such as loopback or a cloud metadata endpoint, than the encoded input appeared to contain. This is an incomplete-fix variant of CVE-2026-6322, whose encoded-authority-delimiter fix introduced the second decode.Patches
Fixed in
fast-uri2.4.5, 3.1.6, and 4.1.3.Workarounds
Reject untrusted URIs whose host component contains an encoded percent sign (
%25) before passing them tonormalize()orresolve().Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to host confusion via skipped IDN canonicalization on scheme-relative references
CVE-2026-75931 / GHSA-5jgf-p345-68v8
More information
Details
Impact
fast-uricanonicalizes a host to its ASCII form only when the input carries an explicit scheme. Whenresolve()resolves a scheme-relative reference (//host/) against a scheme-bearing base, it still emits the host verbatim even though the effective scheme is known, so re-parsing the resolved URI yields a different host than the oneresolve()returned. An application that resolves an untrusted reference withfast-uriand then checks or routes on the resulting host can make a policy decision on one host and reach another. This is an incomplete-fix variant of CVE-2026-13676, whose IDN canonicalization was applied only to the scheme-bearing form.Patches
Upgrade to
fast-uri2.4.5, 3.1.6, or 4.1.3.resolve()now canonicalizes the host once the effective scheme is known, and fails closed if a raw non-ASCII host cannot be converted.Workarounds
Resolve scheme-relative references against a base that carries a scheme before performing any host-policy or origin check.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to host confusion via percent-encoded scheme normalization
CVE-2026-76172 / GHSA-jqff-g426-hqxp
More information
Details
Impact
fast-uridecodes percent-encoded characters in the scheme component with the legacy globalunescape()and serializes the result back as raw characters, without re-escaping it or validating it as a scheme. A scheme that decodes to characters outside the RFC 3986 scheme grammar can therefore introduce structure the original input did not contain.For example,
%2f%2fevil.example:/pwnparses with no authority (parse().hostisundefined), butresolve()andnormalize()return//evil.example:/pwn, which reparses with hostevil.example. The%uXXXXform (%u002f%u002fevil.example:/pwn) produces the same result, and a scheme containing%0d%0areaches the output as a raw CR LF.Applications that normalize or resolve untrusted URLs before a redirect check, host allowlist, or outbound request decision, especially ones that treat a missing authority as same-origin, can be steered to an attacker-chosen authority, and a normalized URI placed in a response header can carry an injected CR LF.
Patches
Upgrade to
fast-uri>= 4.1.3, or >= 3.1.6 in the v3.x release line, or >= 2.4.5 in the v2.x release line.Workarounds
None. Upgrade to the patched version.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to server-side request forgery via malformed IPv6 normalization
CVE-2026-75975 / GHSA-f65p-4m7j-42xc
More information
Details
Impact
fast-uridoes not validate the complete RFC 3986 grammar for bracketed IPv6 literals, so a malformed literal with invalid trailing text is silently truncated to a different valid IPv6 address with no error reported. For example,normalize('http://[::not-valid]/private')returnshttp://[::]/private, and[fc00::not-hex]and[fe80::not-hex]collapse to[fc00::]and[fe80::]. An application that normalizes an untrusted URL before an outbound request, redirect, or host-policy check can be routed to a local or private address such as loopback (::1), unique-local, or link-local. Becauseparse().erroris unset for these inputs, checking it does not protect the consumer.Patches
Upgrade to
fast-uri2.4.5, 3.1.6, or 4.1.3. Malformed IPv6 literals are now rejected with a host error instead of being normalized to a valid address.Workarounds
Reject untrusted URLs whose host is a bracketed IPv6 literal before passing them to
fast-uri, or route outbound requests against an explicit allowlist of addresses rather than trusting the normalized host.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to inconsistent host case normalization via percent-encoded octets
CVE-2026-86472 / GHSA-hrr3-gc8f-f4qj
More information
Details
Impact
fast-urifolds the host to lowercase before it percent-decodes the host, so a percent-encoded uppercase unreserved octet such as%41decodes to a literalAthat is never folded. For a scheme-relative reference (//host) there is no scheme, so the host canonicalization that repairs this on a scheme-bearing URL does not run. As a resultparse,normalize, andequaldisagree on the same host:parse("//%41.com").hostreturns"A.com"whileparse("//a.com").hostandparse("//A.com").hostreturn"a.com", andequal("//%41.com", "//a.com")isfalseeven thoughequal("//A.com", "//a.com")istrue. An application that makes a case-sensitive host decision onfast-urioutput for a scheme-relative reference, for example a host allowlist or denylist that comparesparse(url).hostor usesfast-uri.equal, can be steered past the check with a percent-encoded uppercase octet. Because a hostname is case-insensitive in DNS and HTTP routing, the evading spelling reaches the same host the check meant to gate, so the effect is check evasion rather than reaching a different registrable host.Patches
Upgrade to
fast-uri4.1.5, 3.1.8, or 2.4.7.Workarounds
Compare hosts case-insensitively (lowercase the parsed host before any allowlist or denylist decision), or avoid making case-sensitive host decisions on scheme-relative input until upgrading.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to host confusion via unchecked WHATWG host canonicalization
CVE-2026-110180 / GHSA-wjr9-j795-jxcr
More information
Details
Impact
fast-uriversions>= 2.4.2, <= 2.4.7,>= 3.1.3, <= 3.1.8, and>= 4.0.1, <= 4.2.2can silently rewrite the host of an HTTP-family URL (http,https,ws,wss, or any scheme withdomainHost: true). For those schemescanonicalizeHost()passes the parsed host to the WHATWGURLparser and adopts its.hostnamewithout checking that the parser read the whole input as a host. RFC 3986 permits@inside the host group and the WHATWG parser strips TAB, LF, and CR, so the authorityfast-urireports is rewritten by that second parser with noerrorset: data before an@is dropped and whitespace is removed.For example,
fast-uriparseshttp://a@b@evil.example/to hostevil.example(dropping thebsegment), and a host containing a raw TAB, CR, or LF has those characters stripped.equal()then treats a whitespace-smuggled host as the same as the clean one, andresolve()rewrites the authority the same way.Applications that use
fast-urito enforce host-based policy (denylists, loopback filtering, redirect validation, outbound proxy routing) on one representation, such as the raw input, see a policy/use desync: the canonical hostfast-urireturns differs from what was checked, and traffic can be steered to an unintended destination.Patches
Upgrade to
fast-uri2.4.8,3.1.9, or4.2.3.Workarounds
Reject URIs whose authority contains more than one
@, or contains TAB, CR, or LF, before callingfast-uri. Alternatively, treat any non-emptyparse(x).erroras fatal, and compare hosts only from the sameparse()result.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to scheme injection via an unescaped first-segment colon in suffix references
CVE-2026-110725 / GHSA-333x-w4r6-6crp
More information
Details
Impact
fast-uri'sserialize(),normalize(), andresolve(), when called with the non-default optionreference: 'suffix'on a reference that has no authority, emit a relative reference whose first path segment contains a bare colon without escaping it. RFC 3986 section 3.3 requires the first segment of apath-noschemereference not to contain a colon, precisely because a bare colon makes the string reparse as an absolute URI with a scheme.fast-uri's default serialization escapes that colon, but the suffix path does not.For example,
normalize('javascript:alert(1)', { reference: 'suffix' })returnsjavascript:alert(1), which reparses as a livejavascript:scheme;data:andvbscript:behave the same.Applications that serialize or normalize a relative reference with
reference: 'suffix'and then treat the result as a URI can turn inert input into a livejavascript:,data:, orvbscript:URL (a cross-site scripting vector), andequal()can conflate a scheme-bearing reference with a relative one. Exposure is limited to applications that use the non-defaultreference: 'suffix'option.Patches
Upgrade to
fast-uri2.4.8,3.1.9, or4.2.3.Workarounds
Do not use the
reference: 'suffix'option on untrusted input. If suffix output is required, percent-encode a colon in the first path segment of the result before treating it as a URI.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to URI scheme spoofing via percent-encoded scheme decoding
CVE-2026-110306 / GHSA-w74x-v6f9-j3xg
More information
Details
Impact
fast-uripercent-decodes the scheme component with the legacy globalunescape()before validating it, so an input whose decoded scheme is a valid but dangerous token is emitted as a live scheme. RFC 3986 section 3.1 does not allow percent-encoding in a scheme, so no RFC or WHATWG parser treats such input as having that scheme, butfast-uridoes.For example,
normalize('%6Aavascript:alert(1)')returnsjavascript:alert(1),resolve('https://a.example/', '%6Aavascript:alert(1)')returnsjavascript:alert(1), andparse('%6Aavascript:alert(1)').schemereturnsjavascript. The%uXXXXform (%u006Aavascript:) produces the same result, andequal('%68ttp://a/', 'http://a/')returnstrue.An application that screens dangerous schemes on the raw input and then stores or renders
normalize(input)orresolve(base, input)turns an inert string into an executablejavascript:,data:, orvbscript:URL, a stored or reflected cross-site scripting vector in the consuming application.equal()also treats an encoded and a plain scheme as the same, which can bypass equality-based allowlists.Patches
Upgrade to
fast-uri2.4.8,3.1.9, or4.2.3.Workarounds
Reject input whose scheme part (before the first
:, and before any/,?, or#) contains%. Alternatively, checkparse(x).schemeagainst an allowlist after normalization and use that same parsed result rather than the raw string.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to improper path equivalence in relative reference normalization
CVE-2026-110095 / GHSA-xhq7-xmqj-769h
More information
Details
Impact
fast-uri'snormalize()andserialize()apply RFC 3986 dot-segment removal (remove_dot_segments) to the path of a relative-path reference. RFC 3986 section 5.2.4 defines that algorithm only for the merged target path during resolution, not for the reference itself, so applied to the reference it drops leading..segments and can turn a document-relative reference into a root-relative one.For example,
normalize('a/../b')returns/bandnormalize('../x')returnsx, soresolve(base, normalize(ref))points at a different resource thanresolve(base, ref), andequal()treats distinct references as the same.Applications that normalize attacker-supplied or user-supplied relative references and then resolve them, or use them as cache, deduplication, or authorization keys, can have a reference escape its intended directory and point at a different resource.
Patches
Upgrade to
fast-uri2.4.8,3.1.9, or4.2.3.Workarounds
Do not normalize a relative reference before resolving it. Resolve it against the absolute base first, then normalize the absolute result.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
fast-uri vulnerable to authority injection via an unvalidated port in serialize
CVE-2026-84292 / GHSA-qw65-cvwx-89v3
More information
Details
Impact
fast-uriserializes theportcomponent of a URI without validating it. When recomposing the authority,fast-uriescapes the userinfo and host components but concatenates the port verbatim, so aportvalue that is not a sequence of digits can inject authority delimiters. For example, serializing a component whoseportis@127.0.0.1:8124produceshttp://trusted.example:@127.0.0.1:8124/app, demoting the intended host to userinfo and pointing the authority at an attacker-controlled host. Bothfast-uriand Node'sURLread 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
portcomponent (for example a fixed host from configuration and a port taken from user input or a service record). The same path is reachable throughserialize(),normalize(), andequal()in their object forms. Aportobtained fromparse()is always digits and is not affected.Patches
This vulnerability has been patched in fast-uri
4.1.4,3.1.7, and2.4.6.recomposeAuthoritynow rejects any port that is not*DIGITper RFC 3986. All users should upgrade.Workarounds
If upgrading is not immediately possible, validate the
portvalue against the RFC 3986 grammar (digits only) before passing a component toserialize(),normalize(), orequal(), and reject anything else, for exampleif (!/^\d*$/.test(String(port))) throw new Error('invalid port').Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
fastify/fast-uri (fast-uri)
v3.1.9Compare Source
Security
This security release fixes four URI parsing and normalization vulnerabilities in fast-uri 3.x. Applications that process untrusted URI input should upgrade to v3.1.9.
Upgrade with:
Thanks to @zekth for reporting the scheme, host, and relative-reference issues, and to @UlisesGascon for finding the suffix-reference issue and reviewing the remediations.
What's Changed
Full Changelog: fastify/fast-uri@v3.1.8...v3.1.9
v3.1.8Compare Source
This security release fixes the following medium-severity security advisory:
Users of the v3.x release line should upgrade to v3.1.8.
Full Changelog: fastify/fast-uri@v3.1.7...v3.1.8
v3.1.7Compare Source
This is a security release that fixes the following high-severity security advisories:
serialize()Users of the v3.x release line should upgrade to v3.1.7.
Full Changelog: fastify/fast-uri@v3.1.6...v3.1.7
v3.1.6Compare Source
This release addresses the following high-severity security advisories:
Users of the v3.x release line should upgrade to v3.1.6.
Full Changelog: fastify/fast-uri@v3.1.5...v3.1.6
v3.1.5Compare Source
Fix for GHSA-7p8r-x3mc-p8w7
Full Changelog: fastify/fast-uri@v3.1.4...v3.1.5
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.