CVE-2026-7120: @fastify/static @fastify/static Vulnerable To Authorization Bypass Vulnerability
MODERATECVE-2026-7120 is a MODERATE (CVSS 5.3) @fastify/static vulnerable to authorization bypass vulnerability (CWE-180: Incorrect Behavior Order: Validate Before Canonicalize) affecting @fastify/static libraries in the npm ecosystem. The issue involves @fastify/static vulnerable to authorization bypass via non-canonical url paths. Remediation is available by upgrading affected packages to version 10.1.2.
CVE-2026-7120 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-7120
To remediate this vulnerability, upgrade all affected @fastify/static dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @fastify/static@10.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @fastify/static
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-7120, inspect your project dependencies using npm:
npm ls @fastify/static
Analyze the terminal output to locate any version of @fastify/static in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.1.2), your application is affected.
Note: The npm ls @fastify/static command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-180: Incorrect Behavior Order: Validate Before Canonicalize, where the product validates input before it is canonicalized, which prevents the product from detecting data that becomes invalid after the canonicalization step. In @fastify/static, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-7120 Affected @fastify/static Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@fastify/static
|
npm |
< 10.1.2
|
10.1.2
|
References
Frequently Asked Questions
What is CVE-2026-7120?
Which @fastify/static versions are affected?
What version fixes CVE-2026-7120?
Is @fastify/static affected?
What is the CVSS score of CVE-2026-7120?
What CWE is associated with CVE-2026-7120?
How can I check npm dependencies for CVE-2026-7120?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8pvw-jcv7-9cmj",
"modified" : "2026-07-24T16:43:44Z",
"published" : "2026-07-24T16:43:44Z",
"aliases" : [ "CVE-2026-7120" ],
"summary" : "@fastify/static vulnerable to Authorization Bypass via Non-Canonical URL Paths",
"details" : "### Impact\n\n`@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.\n\nApplications 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.\n\n### Patches\n\nUpgrade to `@fastify/static` >= 10.1.2.\n\n### Workarounds\n\nNone. Upgrade to the patched version.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@fastify/static"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "10.1.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 10.1.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-static/security/advisories/GHSA-8pvw-jcv7-9cmj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-7120"
}, {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-static/commit/878c72e920fabacf7e37739bf78057044717bf63"
}, {
"type" : "WEB",
"url" : "https://cna.openjsf.org/security-advisories.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/fastify/fastify-static"
}, {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-static/releases/tag/v10.1.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-180" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T16:43:44Z",
"nvd_published_at" : "2026-07-23T04:16:33Z"
}
}