CVE-2025-48068: Next Information Exposure Vulnerability

LOW
Advisory Identifier: GHSA-3h52-269p-cp9r
CWE-1385
Published
Advisory Summary

CVE-2025-48068 is a LOW information exposure vulnerability (CWE-1385: Missing Origin Validation in WebSockets) affecting Next libraries in the npm ecosystem. The issue involves information exposure in next.js dev server due to lack of origin verification. Remediation is available by upgrading affected packages to version 15.2.2, 14.2.30.

CVE-2025-48068 at a Glance

CVE Identifier CVE-2025-48068
GHSA Identifier GHSA-3h52-269p-cp9r
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-1385: Missing Origin Validation in WebSockets
Affected Product Next
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-48068

To remediate this vulnerability, upgrade all affected Next dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

next fixed: 15.2.2
npm install next@15.2.2
next fixed: 14.2.30
npm install next@14.2.30
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 next

How to Check if You Are Affected

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

npm ls next

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

Note: The npm ls next 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-1385: Missing Origin Validation in WebSockets, where the product uses a websocket, but it does not properly verify that the source of data or communication is valid. In Next, 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 A low-severity vulnerability in **Next.js** has been fixed in **version 15.2.2**. This issue may have allowed limited source code exposure when the dev server was running with the App Router enabled. The vulnerability only affects local development environments and requires the user to visit a malicious webpage while `npm run dev` is active. Because the mitigation is potentially a breaking change for some development setups, to opt-in to the fix, you must configure `allowedDevOrigins` in your next config after upgrading to a patched version. [Learn more](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins). Learn more: https://vercel.com/changelog/cve-2025-48068 ## Credit Thanks to [sapphi-red](https://github.com/sapphi-red) and [Radman Siddiki](https://github.com/R4356th) for responsibly disclosing this issue.

CVE-2025-48068 Affected Next Versions

2 component(s)
Fixed Versions:
15.2.214.2.30
Product / Package Ecosystem Affected Versions Fixed Version
next
npm
≥ 15.0.0
< 15.2.2
15.2.2
next
npm
≥ 13.0
< 14.2.30
14.2.30

References

Frequently Asked Questions

What is CVE-2025-48068?
CVE-2025-48068 is a security vulnerability in Next involving Information exposure in Next.js dev server due to lack of origin verification under CWE-1385: Missing Origin Validation in WebSockets.
Which Next versions are affected?
Affected versions include releases prior to 15.2.2, 14.2.30 across affected packages: next.
What version fixes CVE-2025-48068?
Upgrading to 15.2.2, 14.2.30 (or the latest patched release for your respective branch) resolves the vulnerability.
Is next affected?
Yes, next is affected in releases prior to 15.2.2, 14.2.30. Upgrade your dependency to 15.2.2, 14.2.30 or later.
What CWE is associated with CVE-2025-48068?
CVE-2025-48068 is classified under CWE-1385: Missing Origin Validation in WebSockets (The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.).
How can I check npm dependencies for CVE-2025-48068?
Run the dependency tree command: 'npm ls next'. 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-3h52-269p-cp9r",
  "modified" : "2025-06-13T14:41:21Z",
  "published" : "2025-05-28T21:52:13Z",
  "aliases" : [ "CVE-2025-48068" ],
  "summary" : "Information exposure in Next.js dev server due to lack of origin verification",
  "details" : "## Summary\n\nA low-severity vulnerability in **Next.js** has been fixed in **version 15.2.2**. This issue may have allowed limited source code exposure when the dev server was running with the App Router enabled. The vulnerability only affects local development environments and requires the user to visit a malicious webpage while `npm run dev` is active.\n\nBecause the mitigation is potentially a breaking change for some development setups, to opt-in to the fix, you must configure `allowedDevOrigins` in your next config after upgrading to a patched version. [Learn more](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins).\n\nLearn more: https://vercel.com/changelog/cve-2025-48068\n\n## Credit\n\nThanks to [sapphi-red](https://github.com/sapphi-red) and [Radman Siddiki](https://github.com/R4356th) for responsibly disclosing this issue.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "next"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0.0"
      }, {
        "fixed" : "15.2.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "next"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "13.0"
      }, {
        "fixed" : "14.2.30"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vercel/next.js/security/advisories/GHSA-3h52-269p-cp9r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48068"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vercel/next.js"
  }, {
    "type" : "WEB",
    "url" : "https://vercel.com/changelog/cve-2025-48068"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1385" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-28T21:52:13Z",
    "nvd_published_at" : "2025-05-30T04:15:48Z"
  }
}