/

CVE-2026-127064

Severity:

HIGH RISK

(8.2)

Path Traversal (CWE-22) in @fastify/reply-from Plugin

CVE-2026-127064

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-436

Impact:

Unauthorized access to upstream paths and potential state-changing requests

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in @fastify/reply-from can let an unauthenticated client escape the intended upstream URL prefix when crafted path segments pass the plugin's checks but are normalized differently by the backend. On affected backends, this may expose internal endpoints or allow state-changing requests to reach paths outside the configured prefix.

Affected context

The issue occurs in @fastify/reply-from URL construction when the plugin checks for parent-directory segments and verifies that a request remains under the configured base prefix. Some backends, including Apache Tomcat, Jetty, WildFly, and Spring Boot, may strip semicolon path parameters before resolving dot-segments, producing a different path interpretation from the plugin. Deployments proxying to Node.js, nginx, or Express upstreams are not affected according to the vulnerability description.

Exploit preconditions

  • Attack surface: A Fastify application forwards client requests through @fastify/reply-from to an upstream server.
  • Required access: An unauthenticated client can send requests to the forwarding route.
  • Trigger point: The plugin constructs and validates the upstream URL.
  • Why exploitation is possible: A path segment containing a semicolon parameter can evade exact-match traversal checks, while the upstream backend may remove the parameter and resolve the segment as a parent-directory reference.

Why this happens

The underlying issue is inconsistent path interpretation across components, associated with CWE-22: Improper Limitation of a Pathname to a Restricted Directory and CWE-436: Interpretation Conflict. The plugin checks for a literal parent-directory segment and applies a base-prefix containment check before the upstream server performs its own normalization. Because semicolon path parameters may be handled differently by the two components, validation can approve a URL that the backend later resolves outside the intended prefix.

Potential impact

  • A client may reach upstream paths outside the configured forwarding prefix.
  • Internal or administrative endpoints may be exposed through the proxy.
  • State-changing requests could be routed to unintended upstream endpoints.
  • Sensitive data or backend functionality may be accessible, depending on the exposed routes and upstream controls.

General mitigation guidance

Defensive approaches focus on ensuring that validation and routing use the same canonical path interpretation.

  • Normalize paths consistently before checking traversal and prefix containment.
  • Reject ambiguous or non-canonical path segments, including parameterized traversal forms.
  • Prefer secure-by-default URL construction that constrains requests to an explicit upstream origin and path boundary.
  • Reduce trust in client-supplied path components and apply allowlists for permitted routes and methods.
  • Use least-privilege upstream credentials and access controls so the proxy cannot invoke unnecessary internal functionality.

How teams detect issues like this

Review URL-building and proxy code for exact-string traversal checks, path-prefix checks performed before canonicalization, and differences between the proxy parser and upstream normalization rules. Static analysis and code review can look for semicolon parameters or other ambiguous path syntax passing through routing boundaries. Policy tests can verify that normalized upstream paths remain within an explicitly configured prefix across supported backends, and logs can be reviewed for unexpected requests to internal or administrative routes.

Sources

SourceLink
cna.openjsf.orgcna.openjsf.org/security-advisories.html
github.comgithub.com/fastify/fastify-reply-from/security/advisories/GHSA-6mph-mjg3-f943

Frequently asked

questions

Yes, where an unauthenticated client can reach a forwarding route and the upstream backend applies the described semicolon-parameter normalization.

The vulnerability description states that an unauthenticated client can trigger the issue. Deployment-level controls may still restrict access to the forwarding route.

Ensure paths are canonicalized consistently before validation and routing, reject ambiguous traversal forms, and enforce containment against the canonical path.

Test path validation against the normalization behavior of each supported upstream, use allowlists for forwarded routes, and restrict the proxy's upstream privileges.

Find out what's already
exploitable in your codebase.