CVE-2026-18427 Details
Description
@fastify/static before version 10.1.3 contains an incomplete fix for a previous route guard bypass. The static file handler rejected only parent directory segments, but it did not canonicalize dot segments, duplicate slashes, encoded dots, or backslashes before route matching and before delegating to the send layer. As a result, an unauthenticated attacker could request a file protected by a route based guard using a non canonical path form that misses the guarded route yet resolves back onto the protected file, disclosing its contents. Applications that protect a subtree of the static root with a route based guard are affected, while applications relying on the allowedPath option are not. This is fixed in @fastify/static 10.1.3, which canonicalizes the pathname, including rejecting backslashes, on the path used for routing and serving.
A route guard bypass vulnerability has been identified in the @fastify/static package, affecting versions prior to 10.1.3. The issue arises because the static file handler does not properly canonicalize certain path segments, such as dots, duplicate slashes, and backslashes, before matching routes. This oversight allows an unauthenticated attacker to use a non-canonical path that avoids the guarded route while still accessing protected files, thereby disclosing their contents. The vulnerability specifically impacts applications that use route-based guards to protect files served by @fastify/static, while those that rely on the allowedPath option are not affected.
Users can upgrade to @fastify/static version 10.1.3 or later to address this vulnerability. For applications that cannot upgrade, it is recommended to avoid using route-based guards to protect files served by @fastify/static, as this vulnerability does not affect the allowedPath option.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Aug 6, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cna.openjsf.org/security-advisories.html | openjs | Third Party Advisory |
| https://github.com/fastify/fastify-static/security/advisories/GHSA-423g-23ch-w7c6 | openjs | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | openjs |
| CWE-436 | Interpretation Conflict | openjs |
Affected Products
| Product | Versions |
|---|---|
| fastify fastify-static | < 10.1.3 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 4, 2026 | Initial Analysis | [email protected] |
| Aug 6, 2026 | CVE Modified | CISA-ADP |
| Aug 6, 2026 | New CVE Received | openjs |