npm
CVE-2026-12590
body-parser vulnerable to denial of service when invalid limit value silently disables size enforcement
- Severity
- Low 3.7
- Published
- 20 Jul 2026
- Last changed
- 10 Sept 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 1.20.6, 2.3.0
- Exploit chance
- 0.4% in the next 30 daysHigher than 36% of CVEs. EPSS by FIRST, 19 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Slow it down
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L- Also known as
- GHSA-v422-hmwv-36x6
- Sources
- OSV.dev and GitHub
Description
When body-parser is configured with an invalid limit option value, such as an unparseable string or NaN, bytes.parse() returns null and the request body size check is silently skipped. Applications that rely on limit as their primary safeguard against oversized request bodies will accept arbitrarily large payloads, leading to excessive memory and CPU usage and denial of service.
This issue affects applications that pass a programmatically computed or user-configurable value to the limit option without validating it first.
Workarounds
Validate limit before passing it to body-parser. For example, parse the value with bytes.parse() at startup and reject any configuration where it returns null or a non-finite number.
Affected software
| Software | Affected versions |
|---|---|
body-parsernpm · osv:npm:body-parser |
|
About body-parser
- Weekly downloads (npm)
- 201,776,539npm, 15 Nov 2026
Vulnerabilities in body-parser
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-111181body-parser vulnerable to Denial of Service via trailing bytes after a compressed request bodyHigh 7.5 23 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-12590
- GitHub Advisory Database https://github.com/advisories/GHSA-v422-hmwv-36x6