5.3medium
@fastify/static vulnerable to route guard bypass via default index and extension resolution
- Severity
- 5.3medium CVSS:3.1 by openjs
- Exploit likelihood
- 0.28% (higher than 22% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- openjs
Description
@fastify/static is the Fastify plugin for serving static files. In versions before 10.1.8, the allowedPath guard receives only the requested pathname, but the underlying send step selects the file to serve afterwards, so a request for a directory resolves to its default index file and an extensionless request resolves through the configured extensions to a matching file. The selected file is streamed without being re-checked against allowedPath, so a guard that denies a specific file is bypassed by requesting its directory or extensionless form. An unauthenticated client can read files inside the static root that the application meant to keep private whenever the denied file is reachable as a directory index or an extension match. The issue is fixed in @fastify/static 10.1.8, and users should upgrade to 10.1.8 or later. As a workaround, also deny the directory and extensionless forms in allowedPath, or disable the index and extensions options.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| @fastify/static @fastify/static | before 10.1.8 Not affected: 10.1.8 | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-115515 changed 2026-11-19 | CVE Terms of Use |
| NVD | CVE-2026-115515 changed 2026-11-23 | Public domain |