CVE-2026-7120
JSON

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 packageVersionsReported by
@fastify/static @fastify/staticbefore 10.1.2
Not affected: 10.1.2
CVE List
@fastify/static (npm)before 10.1.2GitHub Advisory Database
fastify fastify-staticbefore 10.1.2NVD

All scores

openjs5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-180

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

SourceRecordLicence
CVE ListCVE-2026-7120 changed 2026-07-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-8pvw-jcv7-9cmj changed 2026-07-24CC-BY-4.0
NVDCVE-2026-7120 changed 2026-07-28Public domain