CVE-2026-6414
Path Traversal Bypass in @fastify/static via Encoded Separators
Publication date: 2026-04-16
Last updated on: 2026-04-23
Assigner: openjs
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| fastify | fastify-static | From 8.0.0 (inc) to 9.1.1 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-177 | The product does not properly handle when all or part of an input has been URL encoded. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability allows attackers to bypass route-based middleware or guards that protect files served by @fastify/static by exploiting a mismatch in path separator decoding. Such unauthorized access to protected files could lead to exposure of sensitive data.
By potentially exposing protected files or data, this vulnerability may impact compliance with standards and regulations like GDPR or HIPAA, which require strict access controls and protection of sensitive information.
However, the provided information does not explicitly describe the compliance impact or specific regulatory consequences.
Can you explain this vulnerability to me?
The vulnerability exists in @fastify/static versions 8.0.0 through 9.1.0 where percent-encoded path separators (%2F) are decoded before filesystem resolution, but Fastify's router treats these encoded separators as literal characters. This inconsistency allows attackers to bypass route-based middleware or guards that are intended to protect files served by @fastify/static.
For example, an attacker can circumvent a route guard on a protected path by encoding the path separator in the URL, effectively bypassing security controls.
The issue is fixed in @fastify/static version 9.1.1, and there are no workarounds available.
How can this vulnerability impact me? :
This vulnerability can allow attackers to bypass route-based middleware or guards that protect sensitive files served by @fastify/static. As a result, unauthorized users may gain access to protected resources or files that should otherwise be restricted.
Such unauthorized access can lead to exposure of sensitive information or data leakage, potentially compromising the security of your application.
What immediate steps should I take to mitigate this vulnerability?
Upgrade @fastify/static to version 9.1.1 or later to fix the issue.
There are no workarounds available for this vulnerability.