CVE-2026-6414: @fastify/static @fastify/static Vulnerable To Route Guard Vulnerability

MODERATE
Advisory Identifier: GHSA-x428-ghpx-8j92
CVSS 5.9
CWE-177
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-6414
GHSA Identifier GHSA-x428-ghpx-8j92
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-177: Improper Handling of URL Encoding (Hex Encoding)
Affected Product @fastify/static
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

@fastify/static fixed: 9.1.1
npm install @fastify/static@9.1.1
Verify Direct and Transitive Dependencies

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

### Impact `@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. Applications that rely on route-based middleware or guards to protect files served by @fastify/static can be bypassed with encoded path separators. ### Patches Upgrade to `@fastify/static` >= 9.1.1. ### Workarounds None. Upgrade to the patched version.

CVE-2026-6414 Affected @fastify/static Versions

1 component(s)
Fixed Versions:
9.1.1
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?
CVE-2026-6414 is a security vulnerability in @fastify/static involving @fastify/static vulnerable to route guard bypass via encoded path separators under CWE-177: Improper Handling of URL Encoding (Hex Encoding).
Which @fastify/static versions are affected?
Affected versions include releases prior to 9.1.1 across affected packages: @fastify/static.
What version fixes CVE-2026-6414?
Upgrading to 9.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @fastify/static affected?
Yes, @fastify/static is affected in releases prior to 9.1.1. Upgrade your dependency to 9.1.1 or later.
What is the CVSS score of CVE-2026-6414?
CVE-2026-6414 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-6414?
CVE-2026-6414 is classified under CWE-177: Improper Handling of URL Encoding (Hex Encoding) (The product does not properly handle when all or part of an input has been URL encoded.).
How can I check npm dependencies for CVE-2026-6414?
Run the dependency tree command: 'npm ls @fastify/static'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}