@fastify/static vulnerable to path traversal in directory listingGHSA-pr96-94w5-mx2h
MEDIUMGHSA-pr96-94w5-mx2h is a medium-severity (CVSS 5.3) Path Traversal vulnerability in @fastify/static. A fix is available for @fastify/static — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-pr96-94w5-mx2h.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@fastify/staticnpmDescription
Impact
@fastify/static v9.1.0 and earlier serves directory listings outside the configured static root when the list option is enabled. A request such as /public/../outside/ causes dirList.path() to resolve a directory outside the root via 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 names and filenames that should not be exposed. File contents are not disclosed.
Patches
Upgrade to @fastify/static >= 9.1.1.
Workarounds
Disable directory listing by removing the list option from the plugin configuration.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @fastify/static | ≥ 8.0.0&&< 9.1.1 | 9.1.1npm install @fastify/static@9.1.1 |
Affected Products
fastify-staticfastifyDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @fastify/static, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @fastify/static to 9.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-pr96-94w5-mx2h is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for GHSA-pr96-94w5-mx2h (CC BY 4.0)
Frequently Asked Questions
Is GHSA-pr96-94w5-mx2h in your dependencies?
Find it across npm, including transitive dependencies.