Vulnerability advisory

CVE-2026-6410

@fastify/static vulnerable to path traversal in directory listing

Published Updated OSV record ↗

Also known as GHSA-pr96-94w5-mx2h

Severity
  • CVSS 3.xCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/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 allow path traversal when directory listing is enabled via the list option. The dirList.path() function resolves directories outside the configured static root using path.join() without a containment check. A remote unauthenticated attacker can obtain directory listings for arbitrary directories accessible to the Node.js process, disclosing directory and file names. File contents are not disclosed. Upgrade to @fastify/static 9.1.1 to fix this issue. As a workaround, disable directory listing by removing the list option from the plugin configuration.

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