Packages / @fastify/static / Security

HighVulnerabilityGHSA-83w8-p2f5-377rCVE-2026-15074Published 24 Jul 2026

@fastify/static vulnerable to route guard bypass via path traversal

Affected releases · @fastify/static

  • 10.x10.0.0 – 10.1.0Fixed in 10.1.1
  • 9.x9.0.0 – 9.3.0No fix on this line yet
  • 8.x and older5.0.0 – 8.3.0No fix, no longer updated

On 10.x, the newest line:

npm install @fastify/static@10.1.1
10.x
  1. Affected

    10.0.0 – 10.1.0

    2 releases

  2. Fixed

    10.1.1 – 10.1.7

    7 releases, latest

9.x
  1. Affected

    9.0.0 – 9.3.0

    7 releases

8.x
  1. Affected

    8.0.0 – 8.3.0

    9 releases

7.x
  1. Affected

    7.0.0 – 7.0.4

    5 releases

6.x
  1. Affected

    6.0.0 – 6.12.0

    21 releases

5.x
  1. Affected

    5.0.0 – 5.0.2

    3 releases

54 stable releases of @fastify/static, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for @fastify/static. It is read in your browser and sent nowhere.

What happens

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.