CVE-2026-18427 @fastify/static vulnerable to route guard bypass via non-canonical path segments
An attacker can bypass route guards to read protected static files by using non-canonical path segments in requests to the Fastify static plugin.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-18427?
CVE-2026-18427 is a high-severity path traversal vulnerability in @fastify/static, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-18427?
It affects 1 product.
Products include Fastify Fastify-Static.
How do I fix CVE-2026-18427?
No fix has been published for CVE-2026-18427 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-18427 being exploited?
There is no known exploitation of CVE-2026-18427 in the wild and no public exploit code.
Other vulnerabilities in @fastify/static
- CVE-2021-22964 DOS and Open Redirect with user input
- CVE-2026-15074 @fastify/static vulnerable to route guard bypass via path traversal
- CVE-2021-22963 URL Redirection to Untrusted Site ('Open Redirect') in fastify-static
- CVE-2026-6414 @fastify/static vulnerable to route guard bypass via encoded path separators
- CVE-2026-7120 @fastify/static vulnerable to Authorization Bypass via Non-Canonical URL Paths
Sources
Also known as GHSA-423g-23ch-w7c6.