5.3medium
@fastify/static vulnerable to Authorization Bypass via Non-Canonical URL Paths
- Severity
- 5.3medium CVSS:3.1 by openjs
- Exploit likelihood
- 0.22% (higher than 13% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- openjs
- Also known as
- GHSA-8pvw-jcv7-9cmj
Description
@fastify/static evaluates the allowedPath callback before normalizing dot segments and duplicate path separators in the pathname used for file resolution. Versions up to and including 10.1.1 are affected. An unauthenticated attacker can bypass allowedPath restrictions by requesting equivalent non-canonical pathnames, causing files that were intended to be denied to be served anyway. The bypass does not allow access outside the configured static root by itself, it defeats path-based filtering only. The issue is patched in @fastify/static 10.1.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| @fastify/static @fastify/static | before 10.1.2 Not affected: 10.1.2 | CVE List |
| @fastify/static (npm) | before 10.1.2 | GitHub Advisory Database |
| fastify fastify-static | before 10.1.2 | NVD |
All scores
| openjs | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
@fastify/static evaluates the allowedPath callback before normalizing dot segments and duplicate path separators in the pathname used for file resolution. Versions up to and including 10.1.1 are affected. An unauthenticated attacker can bypass allowedPath restrictions by requesting equivalent non-canonical pathnames, causing files that were intended to be denied to be served anyway. The bypass does not allow access outside the configured static root by itself, it defeats path-based filtering only. The issue is patched in @fastify/static 10.1.2.
GitHub Advisory Database
Impact
@fastify/static evaluates the allowedPath callback before normalizing dot segments and duplicate slashes in the pathname used for file resolution. Non-canonical pathnames such as //file, /./file, or /public/../private/file bypass allowedPath filtering while resolving to the intended file on disk.
Applications that use allowedPath as a security boundary to restrict access to specific static files or path subtrees may unintentionally expose files that were intended to be denied.
Patches
Upgrade to @fastify/static >= 10.1.2.
Workarounds
None. Upgrade to the patched version.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-7120 changed 2026-07-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8pvw-jcv7-9cmj changed 2026-07-24 | CC-BY-4.0 |
| NVD | CVE-2026-7120 changed 2026-07-28 | Public domain |