CVE-2025-66415: @fastify/reply from Fastify-reply-from Affected By Bypass Of Vulnerability

MODERATE
Advisory Identifier: GHSA-2q7r-29rg-6m5h
CWE-441
Published
Advisory Summary

CVE-2025-66415 is a MODERATE fastify-reply-from affected by bypass of vulnerability (CWE-441: Unintended Proxy or Intermediary ('Confused Deputy')) affecting @fastify/reply from libraries in the npm ecosystem. The issue involves fastify-reply-from affected by bypass of reply forwarding. Remediation is available by upgrading affected packages to version 12.5.0.

CVE-2025-66415 at a Glance

CVE Identifier CVE-2025-66415
GHSA Identifier GHSA-2q7r-29rg-6m5h
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-441: Unintended Proxy or Intermediary ('Confused Deputy')
Affected Product @fastify/reply from
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-66415

To remediate this vulnerability, upgrade all affected @fastify/reply from 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/reply-from fixed: 12.5.0
npm install @fastify/reply-from@12.5.0
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/reply-from

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-66415, inspect your project dependencies using npm:

npm ls @fastify/reply-from

Analyze the terminal output to locate any version of @fastify/reply from in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.5.0), your application is affected.

Note: The npm ls @fastify/reply-from 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-441: Unintended Proxy or Intermediary ('Confused Deputy'), where the product receives a request, message, or directive from an upstream component, but the product does not sufficiently preserve the original source of the request before forwarding the request to an external actor that is outside of the product's control sphere. this causes the product to appear to be the source of the request, leading it to act as a proxy or other intermediary between the upstream component and the external actor. In @fastify/reply from, 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

### Summary By crafting a malicious URL, an attacker could access routes that are not allowed, even though the `reply.from` is defined for specific routes in `@fastify/reply-from`. ### Details An attacker can bypass the route defined by the `@fastify/reply-from` package by adding a `..` symbol, which, for `curl` version `8.7.1`, is `%2e%2e`. ### Impact Everyone is using this package with the routes option to protect a 3rd-party resource.

CVE-2025-66415 Affected @fastify/reply from Versions

1 component(s)
Fixed Versions:
12.5.0
Product / Package Ecosystem Affected Versions Fixed Version
@fastify/reply-from
npm
< 12.5.0
12.5.0

References

Frequently Asked Questions

What is CVE-2025-66415?
CVE-2025-66415 is a security vulnerability in @fastify/reply from involving fastify-reply-from affected by bypass of reply forwarding under CWE-441: Unintended Proxy or Intermediary ('Confused Deputy').
Which @fastify/reply from versions are affected?
Affected versions include releases prior to 12.5.0 across affected packages: @fastify/reply-from.
What version fixes CVE-2025-66415?
Upgrading to 12.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @fastify/reply-from affected?
Yes, @fastify/reply-from is affected in releases prior to 12.5.0. Upgrade your dependency to 12.5.0 or later.
What CWE is associated with CVE-2025-66415?
CVE-2025-66415 is classified under CWE-441: Unintended Proxy or Intermediary ('Confused Deputy') (The product receives a request, message, or directive from an upstream component, but the product does not sufficiently preserve the original source of the request before forwarding the request to an external actor that is outside of the product's control sphere. This causes the product to appear to be the source of the request, leading it to act as a proxy or other intermediary between the upstream component and the external actor.).
How can I check npm dependencies for CVE-2025-66415?
Run the dependency tree command: 'npm ls @fastify/reply-from'. 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-2q7r-29rg-6m5h",
  "modified" : "2025-12-02T00:38:57Z",
  "published" : "2025-12-02T00:38:57Z",
  "aliases" : [ "CVE-2025-66415" ],
  "summary" : "fastify-reply-from affected by bypass of reply forwarding",
  "details" : "### Summary\nBy crafting a malicious URL, an attacker could access routes that are not allowed, even though the `reply.from` is defined for specific routes in `@fastify/reply-from`.\n\n### Details\n\nAn attacker can bypass the route defined by the `@fastify/reply-from` package by adding a `..` symbol, which, for `curl` version `8.7.1`, is `%2e%2e`.\n\n### Impact\n\nEveryone is using this package with the routes option to protect a 3rd-party resource.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fastify/reply-from"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "12.5.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 12.4.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-2q7r-29rg-6m5h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66415"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fastify/fastify-reply-from/commit/4d9795cd5b57a36756d37b7f036eae369f69fa66"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fastify/fastify-reply-from"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-441" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-02T00:38:57Z",
    "nvd_published_at" : "2025-12-01T23:15:54Z"
  }
}