GitHub Advisoryadvisory · npm

GHSA-83w8-p2f5-377r @fastify/static vulnerable to route guard bypass via path traversal

HIGH Published 2026-07-24 Modified 2026-07-24 Official page ↗
Aliases
CVE-2026-15074
Ecosystem
npm
Packages
@fastify/static
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weaknesses
CWE-22
Reviewed
2026-07-24

Affected packages

• npm @fastify/static: < 10.1.1 → fixed in 10.1.1

Description

Impact `@fastify/static` is vulnerable to a bypass of route-based middleware and guards via non-leading `..` and `%2E%2E` path segments. `find-my-way` does not normalize `..` when matching routes, so a request such as `/foo/../deep/secret.txt` matches the static plugin's catch-all instead of the guarded `/deep/*`. The `getPathnameForSend` helper introduced by the fix for GHSA-x428-ghpx-8j92 only guards against the `%2F` variant; `..` and `%2E%2E` survive the `decodeURI` + `encodeURI` round-trip and are then collapsed away by `@fastify/send`'s `path.normalize` before its own traversal guard runs. Applications that rely on route-based middleware or guards to protect files served by `@fastify/static` can be bypassed with non-leading dot-dot path segments. Patches Upgrade to `@fastify/static` 10.1.1. Workarounds Do not use route-based middlewares or guards to protect files served by `@fastify/static`.

Related

Alias · CVE (1)

  • CVE-2026-15074 @fastify/static up to and including version 10.1.0 fails to reject dot-dot path segments in request pathnames before the file-resolution… vulnerability

Weakness · CWE (1)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

References