CVE-2026-18427

@fastify/static vulnerable to route guard bypass via non-canonical path segments

Published Aug 6, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

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

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:fastify:fastify-static:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify-static
Vendors & Products Fastify
Fastify fastify-static
Type Values Removed Values Added
Metrics ssvc

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

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'}

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

Sources

Status
PUBLISHED
Assigner
openjs
Published
Updated
Aug 6, 2026, 3:44 PM
Reserved
Jul 30, 2026, 6:18 PM
Status
Analyzed
Published
Aug 6, 2026, 4:16 PM
Modified
Sep 4, 2026, 6:16 PM
Severity
Important
Public date
Aug 6, 2026, 2:52 PM