CVE-2025-66415: Fastify reply-from route bypass using path traversal

CVE-2025-66415 · Severity: medium · CVSS 5.4 · Published 2025-12-01

Fastify reply-from is a plugin that forwards HTTP requests to another server and is commonly used to protect third-party resources by restricting which routes can be accessed. An attacker can bypass these route restrictions by crafting malicious URLs containing path traversal sequences (.. or URL-encoded equivalents like %2e%2e), allowing unauthorized access to unprotected resources.

Technologies: Fastify Reply-From, @fastify/reply-from (npm). Vendors: Fastify, npm.

Quick answers

Is CVE-2025-66415 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-66415 being exploited in the wild.
How severe is CVE-2025-66415?
Medium severity, with a CVSS score of 5.4, published 1 December 2025.
Which products and versions are affected?
Fastify Reply-From <= 12.4.0; @fastify/reply-from (npm) SEMVER:introduced=0,fixed=12.5.0.
Is there a fix for CVE-2025-66415?
Yes. @fastify/reply-from (npm): upgrade to 12.5.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-66415 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2025-66415?
Check whether you run Fastify Reply-From or @fastify/reply-from (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @fastify/reply-from (npm): upgrade to 12.5.0 or later
    npm install @fastify/reply-from@12.5.0

Technical details

This vulnerability is a route access control bypass (CWE-441, Confused Deputy problem) in the @fastify/reply-from package. The vulnerable component is the route matching logic that fails to normalize URLs before checking against defined route restrictions. An unauthenticated attacker on the network can craft requests with path traversal sequences (.. or URL-encoded %2e%2e) to bypass the intended route restrictions, potentially accessing third-party resources that should be protected. No user interaction or authentication is required. The fix, released in version 12.5.0, properly normalizes the request URL by stripping query parameters before route matching, eliminating the bypass vector. All versions through 12.4.0 are affected.

Affected products

  • Fastify @fastify/reply-from <= 12.4.0

Identifiers

  • CVE-2025-66415
  • GHSA-2q7r-29rg-6m5h

Timeline

  • 2025-12-02: disclosed: Advisory published by GitHub Security
  • 2025-12-02: patched: Version 12.5.0 released with fix

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.