Vulnerability advisory

CVE-2026-6414

@fastify/static vulnerable to route guard bypass via encoded path separators

Published Updated OSV record ↗

Also known as GHSA-x428-ghpx-8j92

Severity
  • CVSS 3.xCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected versions

Repository

Affected commitsFixed by commit
GIT github.com/fastify/fastify-static ↗
85a80f11f76a0f49d7186c8e512daedcafe21153 to before 48b136f5d8da0efea328f49f6202ab3edabf608b48b136f5d8da0efea328f49f6202ab3edabf608b
Also listed as affected (11)
  • v9.1.0
  • v9.0.0
  • v8.3.0
  • v8.2.0
  • v8.1.1
  • v8.1.0
  • v8.0.4
  • v8.0.3
  • v8.0.2
  • v8.0.1
  • v8.0.0

Description

@fastify/static versions 8.0.0 through 9.1.0 decode percent-encoded path separators (%2F) before filesystem resolution, while Fastify's router treats them as literal characters. This mismatch allows attackers to bypass route-based middleware or guards that protect files served by @fastify/static. For example, a route guard on a protected path can be circumvented by encoding the path separator in the URL. Upgrade to @fastify/static 9.1.1 to fix this issue. There are no workarounds.

References

  • Codex
  • Claude Code
  • VS Code
  • GitHub Copilot
  • Cursor
  • Cline
  • Windsurf
  • Google Anti-gravity
  • OpenCode
  • Pi
  • Gemini CLI
  • Hermes Agent
  • Zed
  • Junie
  • Qwen Code
  • Kiro
  • Kilo Code
  • Factory Droid

Set up GitHits for your agents

Run this command:

<> bash
npx githits@latest init

What happens next:

  1. Opens your browser to authorize GitHits
  2. Asks whether to set up GitHits at the user or project level
  3. Detects your supported AI coding tools
  4. Lets you choose which tools to configure
  5. Configures the selected tools