p PatchFirst

CVE-2025-30218

CVE-2025-30218 · Next.js may leak x-middleware-subrequest-id to external hosts

This page contains facts from public vulnerability sources. Check the original advisory before updating.

Next.js is a React framework for building full-stack web applications. To mitigate CVE-2025-29927, Next.js validated the x-middleware-subrequest-id which persisted across multiple incoming requests. However, this subrequest ID is sent to all requests, even if the destination is not the same host as the Next.js application. Initiating a fetch request to a third-party within Middleware will send the x-middleware-subrequest-id to that third party. This vulnerability is fixed in 12.3.6, 13.5.10, 14.2.26, and 15.2.4.

CVSS 1.7 · Low · EPSS 0.4% · Fix available

Published
Updated

Stack: node

Affected products and versions

  • next.js

    Versions
    • = 12.3.5: Affected
    • = 13.5.9: Affected
    • = 14.2.25: Affected
    • = 15.2.3: Affected

    No fix published

  • next npm

    Versions
    • 12.3.5
    Affected ranges
    • SEMVER: ≥ 12.3.5, < 12.3.6

    Update to 12.3.6

  • next npm

    Versions
    • 13.5.9
    Affected ranges
    • SEMVER: ≥ 13.5.9, < 13.5.10

    Update to 13.5.10

  • next npm

    Versions
    • 14.2.25
    Affected ranges
    • SEMVER: ≥ 14.2.25, < 14.2.26

    Update to 14.2.26

  • next npm

    Versions
    • 15.2.3
    Affected ranges
    • SEMVER: ≥ 15.2.3, < 15.2.4

    Update to 15.2.4

Original sources

Check your server →