CVE-2024-56332: Next Denial of Service Vulnerability
MODERATECVE-2024-56332 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Next libraries in the npm ecosystem. The issue involves next.js allows a denial of service (dos) with server actions. Remediation is available by upgrading affected packages to version 13.5.8, 14.2.21, 15.1.2.
CVE-2024-56332 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2024-56332
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@13.5.8
npm install next@14.2.21
npm install next@15.1.2
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-2024-56332, 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 13.5.8), 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. 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-2024-56332 Affected Next Versions
3 component(s)References
Frequently Asked Questions
What is CVE-2024-56332?
Which Next versions are affected?
What version fixes CVE-2024-56332?
Is next affected?
What is the CVSS score of CVE-2024-56332?
What CWE is associated with CVE-2024-56332?
How can I check npm dependencies for CVE-2024-56332?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7m27-7ghc-44w9",
"modified" : "2025-01-03T21:48:13Z",
"published" : "2025-01-03T20:19:29Z",
"aliases" : [ "CVE-2024-56332" ],
"summary" : "Next.js Allows a Denial of Service (DoS) with Server Actions",
"details" : "### Impact\nA Denial of Service (DoS) attack allows attackers to construct requests that leaves requests to Server Actions hanging until the hosting provider cancels the function execution.\n\n_Note: Next.js server is idle during that time and only keeps the connection open. CPU and memory footprint are low during that time._\n\nDeployments without any protection against long running Server Action invocations are especially vulnerable. Hosting providers like Vercel or Netlify set a default maximum duration on function execution to reduce the risk of excessive billing.\n\nThis is the same issue as if the incoming HTTP request has an invalid `Content-Length` header or never closes. If the host has no other mitigations to those then this vulnerability is novel.\n\nThis vulnerability affects only Next.js deployments using Server Actions.\n\n### Patches\n\nThis vulnerability was resolved in Next.js 14.2.21, 15.1.2, and 13.5.8. We recommend that users upgrade to a safe version.\n\n### Workarounds\n\nThere are no official workarounds for this vulnerability.\n\n### Credits\n\nThanks to the PackDraw team for responsibly disclosing this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "13.0.0"
}, {
"fixed" : "13.5.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "14.0.0"
}, {
"fixed" : "14.2.21"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.0"
}, {
"fixed" : "15.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/security/advisories/GHSA-7m27-7ghc-44w9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56332"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/next.js"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-03T20:19:29Z",
"nvd_published_at" : "2025-01-03T21:15:13Z"
}
}