CVE-2024-34350: Next Next.js Vulnerable To HTTP Request Vulnerability
HIGHCVE-2024-34350 is a HIGH (CVSS 7.5) next.js vulnerable to http request vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Next libraries in the npm ecosystem. The issue involves next.js vulnerable to http request smuggling. Remediation is available by upgrading affected packages to version 13.5.1.
CVE-2024-34350 at a Glance
Security Impact
CVSS: 7.5
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:C/C:L/I:H/A:N).
How to Fix CVE-2024-34350
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.1
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-34350, 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.1), 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-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. 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-34350 Affected Next Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
next
|
npm |
≥ 13.4.0
< 13.5.1
|
13.5.1
|
References
Frequently Asked Questions
What is CVE-2024-34350?
Which Next versions are affected?
What version fixes CVE-2024-34350?
Is next affected?
What is the CVSS score of CVE-2024-34350?
What CWE is associated with CVE-2024-34350?
How can I check npm dependencies for CVE-2024-34350?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-77r5-gw3j-2mpf",
"modified" : "2024-07-09T18:28:18Z",
"published" : "2024-05-09T21:07:00Z",
"aliases" : [ "CVE-2024-34350" ],
"summary" : "Next.js Vulnerable to HTTP Request Smuggling",
"details" : "### Impact\nInconsistent interpretation of a crafted HTTP request meant that requests are treated as both a single request, and two separate requests by Next.js, leading to desynchronized responses. This led to a response queue poisoning vulnerability in the affected Next.js versions.\n\nFor a request to be exploitable, the affected route also had to be making use of the [rewrites](https://nextjs.org/docs/app/api-reference/next-config-js/rewrites) feature in Next.js.\n\n### Patches\nThe vulnerability is resolved in Next.js `13.5.1` and newer. This includes Next.js `14.x`.\n\n### Workarounds\nThere are no official workarounds for this vulnerability. We recommend that you upgrade to a safe version.\n\n### References\nhttps://portswigger.net/web-security/request-smuggling/advanced/response-queue-poisoning",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "13.4.0"
}, {
"fixed" : "13.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/security/advisories/GHSA-77r5-gw3j-2mpf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34350"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/commit/44eba020c615f0d9efe431f84ada67b81576f3f5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/next.js"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/compare/v13.5.0...v13.5.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-444" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-09T21:07:00Z",
"nvd_published_at" : "2024-05-14T15:38:41Z"
}
}