Description
@fastify/static before version 10.1.3 contains an incomplete fix for a previous route guard bypass. The static file handler rejected only parent directory segments, but it did not canonicalize dot segments, duplicate slashes, encoded dots, or backslashes before route matching and before delegating to the send layer. As a result, an unauthenticated attacker could request a file protected by a route based guard using a non canonical path form that misses the guarded route yet resolves back onto the protected file, disclosing its contents. Applications that protect a subtree of the static root with a route based guard are affected, while applications relying on the allowedPath option are not. This is fixed in @fastify/static 10.1.3, which canonicalizes the pathname, including rejecting backslashes, on the path used for routing and serving.
Published: 2026-08-06
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability arises from an incomplete route guard in the @fastify/static library that fails to canonicalize file paths before matching routes. An attacker can supply path segments such as dot segments, duplicate slashes, backslashes, or encoded dots to reach a file that is otherwise protected by a route-based guard. The flaw allows unauthenticated remote access to sensitive files, exposing their contents without authentication, violating confidentiality, and potentially enabling further attacks. It is an example of a path traversal weakness (CWE‑22) and a backslash injection (CWE‑41).

Affected Systems

All installations of @fastify/static earlier than version 10.1.3 that protect a subtree of the static root with a route‑based guard are affected. Applications that rely on the allowedPath option are not impacted. The affected environments are Node.js web applications using Fastify’s static file plugin.

Risk and Exploitability

The CVSS score is 7.5, indicating high severity. The EPSS score is not available, suggesting no publicly known exploitation data; the vulnerability is not listed in CISA’s KEV catalog. The attack vector is a remote HTTP request to a non‑canonical file path, requiring no special privileges on the server. While exploitation is likely possible, the lack of active exploits and the need for a precise path configuration imply a moderate risk of exploitation in the wild.

Generated by OpenCVE AI on August 7, 2026 at 13:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade @fastify/static to version 10.1.3 or later so that path canonicalization is enforced before routing and serving.
  • Reconfigure protected subtrees to use the allowedPath option or remove route‑based guards that rely on incomplete path checks.
  • If an immediate upgrade is not possible, block or log requests containing non‑canonical path segments at the reverse proxy or application firewall to prevent disclosure.

Generated by OpenCVE AI on August 7, 2026 at 13:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 08 Aug 2026 21:15:00 +0000

Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify-static
Vendors & Products Fastify
Fastify fastify-static

Fri, 07 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-41
References
Metrics threat_severity

None

threat_severity

Important


Thu, 06 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 06 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Description @fastify/static before version 10.1.3 contains an incomplete fix for a previous route guard bypass. The static file handler rejected only parent directory segments, but it did not canonicalize dot segments, duplicate slashes, encoded dots, or backslashes before route matching and before delegating to the send layer. As a result, an unauthenticated attacker could request a file protected by a route based guard using a non canonical path form that misses the guarded route yet resolves back onto the protected file, disclosing its contents. Applications that protect a subtree of the static root with a route based guard are affected, while applications relying on the allowedPath option are not. This is fixed in @fastify/static 10.1.3, which canonicalizes the pathname, including rejecting backslashes, on the path used for routing and serving.
Title @fastify/static vulnerable to route guard bypass via non-canonical path segments
Weaknesses CWE-22
CWE-436
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


Subscriptions

Fastify Fastify-static
cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-08-06T15:44:54.638Z

Reserved: 2026-07-30T18:18:39.071Z

Link: CVE-2026-18427

cve-icon Vulnrichment

Updated: 2026-08-06T15:44:51.874Z

cve-icon NVD

Status : Received

Published: 2026-08-06T16:16:38.350

Modified: 2026-08-06T22:16:50.143

Link: CVE-2026-18427

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-06T14:52:26Z

Links: CVE-2026-18427 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-08T20:53:52Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-41

    Improper Resolution of Path Equivalence

  • CWE-436

    Interpretation Conflict