CVE-2025-59472: Next Next.js Has Unbounded Memory Consumption Vulnerability
MODERATECVE-2025-59472 is a MODERATE (CVSS 5.9) next.js has unbounded memory consumption vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting Next libraries in the npm ecosystem. The issue involves next.js has unbounded memory consumption via ppr resume endpoint. Remediation is available by upgrading affected packages to version 15.6.0-canary.61, 16.1.5.
CVE-2025-59472 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2025-59472
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.
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@15.6.0-canary.61
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@16.1.5
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
npm install next@Latest secure release
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-59472, 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.6.0-canary.61), 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-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. 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
CVE-2025-59472 Affected Next Versions
16 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
next
|
npm |
≥ 15.2.1-canary.0
≤ 15.2.1-canary.6
|
|
|
next
|
npm |
≥ 15.2.2-canary.0
≤ 15.2.2-canary.7
|
|
|
next
|
npm |
≥ 15.3.0-canary.0
≤ 15.3.0-canary.46
|
|
|
next
|
npm |
≥ 15.6.0-canary.0
< 15.6.0-canary.61
|
15.6.0-canary.61
|
|
next
|
npm |
≥ 15.2.0-canary.0
≤ 15.2.0-canary.77
|
|
|
next
|
npm |
≥ 15.3.1-canary.0
≤ 15.3.1-canary.15
|
|
|
next
|
npm |
≥ 15.4.0-canary.0
≤ 15.4.0-canary.130
|
|
|
next
|
npm |
≥ 15.4.2-canary.0
≤ 15.4.2-canary.56
|
|
|
next
|
npm |
≥ 15.5.1-canary.0
≤ 15.5.1-canary.39
|
|
|
next
|
npm |
≥ 16.0.0-beta.0
< 16.1.5
|
16.1.5
|
|
next
|
npm |
≥ 15.0.0-canary.0
≤ 15.0.0-canary.205
|
|
|
next
|
npm |
≥ 15.0.1-canary.0
≤ 15.0.1-canary.3
|
|
|
next
|
npm |
≥ 15.0.2-canary.0
≤ 15.0.2-canary.11
|
|
|
next
|
npm |
≥ 15.0.3-canary.0
≤ 15.0.3-canary.9
|
|
|
next
|
npm |
≥ 15.0.4-canary.0
≤ 15.0.4-canary.52
|
|
|
next
|
npm |
≥ 15.1.1-canary.0
≤ 15.1.1-canary.27
|
|
References
Frequently Asked Questions
What is CVE-2025-59472?
Which Next versions are affected?
What version fixes CVE-2025-59472?
Is next affected?
What is the CVSS score of CVE-2025-59472?
What CWE is associated with CVE-2025-59472?
How can I check npm dependencies for CVE-2025-59472?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5f7q-jpqc-wp7h",
"modified" : "2026-04-08T20:56:16Z",
"published" : "2026-01-28T15:20:55Z",
"aliases" : [ "CVE-2025-59472" ],
"summary" : "Next.js has Unbounded Memory Consumption via PPR Resume Endpoint ",
"details" : "A denial of service vulnerability exists in Next.js versions with Partial Prerendering (PPR) enabled when running in minimal mode. The PPR resume endpoint accepts unauthenticated POST requests with the `Next-Resume: 1` header and processes attacker-controlled postponed state data. Two closely related vulnerabilities allow an attacker to crash the server process through memory exhaustion:\n\n1. **Unbounded request body buffering**: The server buffers the entire POST request body into memory using `Buffer.concat()` without enforcing any size limit, allowing arbitrarily large payloads to exhaust available memory.\n\n2. **Unbounded decompression (zipbomb)**: The resume data cache is decompressed using `inflateSync()` without limiting the decompressed output size. A small compressed payload can expand to hundreds of megabytes or gigabytes, causing memory exhaustion.\n\nBoth attack vectors result in a fatal V8 out-of-memory error (`FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory`) causing the Node.js process to terminate. The zipbomb variant is particularly dangerous as it can bypass reverse proxy request size limits while still causing large memory allocation on the server.\n\nTo be affected, an application must run with `experimental.ppr: true` or `cacheComponents: true` configured along with the NEXT_PRIVATE_MINIMAL_MODE=1 environment variable.\n\nStrongly consider upgrading to 15.6.0-canary.61 or 16.1.5 to reduce risk and prevent availability issues in Next applications.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "16.0.0-beta.0"
}, {
"fixed" : "16.1.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.0-canary.0"
}, {
"last_affected" : "15.0.0-canary.205"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.1-canary.0"
}, {
"last_affected" : "15.0.1-canary.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.2-canary.0"
}, {
"last_affected" : "15.0.2-canary.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.3-canary.0"
}, {
"last_affected" : "15.0.3-canary.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.4-canary.0"
}, {
"last_affected" : "15.0.4-canary.52"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.1.1-canary.0"
}, {
"last_affected" : "15.1.1-canary.27"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.2.0-canary.0"
}, {
"last_affected" : "15.2.0-canary.77"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.2.1-canary.0"
}, {
"last_affected" : "15.2.1-canary.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.2.2-canary.0"
}, {
"last_affected" : "15.2.2-canary.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.3.0-canary.0"
}, {
"last_affected" : "15.3.0-canary.46"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.3.1-canary.0"
}, {
"last_affected" : "15.3.1-canary.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.4.0-canary.0"
}, {
"last_affected" : "15.4.0-canary.130"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.4.2-canary.0"
}, {
"last_affected" : "15.4.2-canary.56"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.5.1-canary.0"
}, {
"last_affected" : "15.5.1-canary.39"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.6.0-canary.0"
}, {
"fixed" : "15.6.0-canary.61"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/security/advisories/GHSA-5f7q-jpqc-wp7h"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59472"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/next.js"
}, {
"type" : "WEB",
"url" : "https://vercel.com/changelog/summaries-of-cve-2025-59471-and-cve-2025-59472"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-409", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-28T15:20:55Z",
"nvd_published_at" : "2026-01-26T22:15:53Z"
}
}