CVE-2026-6414: @fastify/static @fastify/static Vulnerable To Route Guard Vulnerability
MODERATECVE-2026-6414 is a MODERATE (CVSS 5.9) @fastify/static vulnerable to route guard vulnerability (CWE-177: Improper Handling of URL Encoding (Hex Encoding)) affecting @fastify/static libraries in the npm ecosystem. The issue involves @fastify/static vulnerable to route guard bypass via encoded path separators. Remediation is available by upgrading affected packages to version 9.1.1.
CVE-2026-6414 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-6414
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@9.1.1
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-6414, 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 9.1.1), 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-177: Improper Handling of URL Encoding (Hex Encoding), where the product does not properly handle when all or part of an input has been url encoded. 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-6414 Affected @fastify/static Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@fastify/static
|
npm |
≥ 8.0.0
< 9.1.1
|
9.1.1
|
References
Frequently Asked Questions
What is CVE-2026-6414?
Which @fastify/static versions are affected?
What version fixes CVE-2026-6414?
Is @fastify/static affected?
What is the CVSS score of CVE-2026-6414?
What CWE is associated with CVE-2026-6414?
How can I check npm dependencies for CVE-2026-6414?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x428-ghpx-8j92",
"modified" : "2026-04-16T22:34:03Z",
"published" : "2026-04-16T22:34:03Z",
"aliases" : [ "CVE-2026-6414" ],
"summary" : "@fastify/static vulnerable to route guard bypass via encoded path separators",
"details" : "### Impact\n\n`@fastify/static` v9.1.0 and earlier decodes percent-encoded path separators (`%2F`) before filesystem resolution, but Fastify's router treats them as literal characters. This creates a routing mismatch: route guards on `/admin/*` do not match `/admin%2Fsecret.html`, but @fastify/static decodes it to `/admin/secret.html` and serves the file.\n\nApplications that rely on route-based middleware or guards to protect files served by @fastify/static can be bypassed with encoded path separators.\n\n### Patches\n\nUpgrade to `@fastify/static` >= 9.1.1.\n\n### Workarounds\n\nNone. Upgrade to the patched version.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@fastify/static"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "9.1.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 9.1.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-static/security/advisories/GHSA-x428-ghpx-8j92"
}, {
"type" : "WEB",
"url" : "https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/hono/security/advisories/GHSA-q5qw-h33p-qvwr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-6414"
}, {
"type" : "WEB",
"url" : "https://cna.openjsf.org/security-advisories.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/fastify/fastify-static"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-177" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T22:34:03Z",
"nvd_published_at" : "2026-04-16T13:16:52Z"
}
}