Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. next
  4. ›
  5. CVE-2025-30218

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

April 2, 2025 (updated April 3, 2025)

In the process of remediating CVE-2025-29927, we looked at other possible exploits of Middleware. We independently verified this low severity vulnerability in parallel with two reports from independent researchers.

Learn more here.

References

  • github.com/advisories/GHSA-223j-4rm8-mrmf
  • github.com/vercel/next.js
  • github.com/vercel/next.js/security/advisories/GHSA-223j-4rm8-mrmf
  • nvd.nist.gov/vuln/detail/CVE-2025-30218
  • vercel.com/changelog/cve-2025-30218-5DREmEH765PoeAsrNNQj3O

Code Behaviors & Features

Detect and mitigate CVE-2025-30218 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 12.3.5 before 12.3.6, version 12.3.5, all versions starting from 13.5.9 before 13.5.10, version 13.5.9, all versions starting from 14.2.25 before 14.2.26, version 14.2.25, all versions starting from 15.2.3 before 15.2.4, version 15.2.3

Fixed versions

  • 12.3.6
  • 13.5.10
  • 14.2.26
  • 15.2.4

Solution

Upgrade to versions 12.3.6, 13.5.10, 14.2.26, 15.2.4 or above.

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

npm/next/CVE-2025-30218.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:54 +0000.