CVE-2026-6321: fast-uri vulnerable to path traversal via percent-encoded dot segments
Impact
fast-uri v3.1.0 and earlier decodes percent-encoded path separators (%2F) and dot segments (%2E) before applying dot-segment removal in normalize() and equal(). This makes encoded path data behave like real / and .., so distinct URIs collapse onto the same normalized path.
For example, http://example.com/public/%2e%2e/admin normalizes to http://example.com/admin, and equal() considers them the same URI.
Applications that normalize or compare attacker-controlled URLs to enforce path-based policy can be bypassed. A path that looks confined under an allowed prefix can normalize to a different location.
Patches
Upgrade to fast-uri >= 3.1.1.
Workarounds
None. Upgrade to the patched version.
Other sources
fast-uri decoded percent-encoded path separators and dot segments before applying dot-segment removal in its normalize() and equal() functions. Encoded path data was treated like real slashes and parent-directory references, so distinct URIs could collapse onto the same normalized path. Applications that normalize or compare attacker-controlled URLs to enforce path-based policy can be bypassed, with a path that appears confined under an allowed prefix normalizing to a different location. Versions <= 3.1.0 are affected. Update to 3.1.1 or later.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-6321?
The severity of CVE-2026-6321 is considered high due to the potential for path traversal vulnerabilities.
How do I fix CVE-2026-6321?
To fix CVE-2026-6321, update the fast-uri library to version 3.1.1 or later.
What kind of attack does CVE-2026-6321 enable?
CVE-2026-6321 enables attackers to exploit a path traversal vulnerability to access unintended files or directories on the server.
Which versions of fast-uri are affected by CVE-2026-6321?
CVE-2026-6321 affects fast-uri versions up to and including 3.1.0.
What functions in fast-uri are related to CVE-2026-6321?
The normalize() and equal() functions in fast-uri are related to CVE-2026-6321 as they improperly handle percent-encoded path separators.