{"id":"CVE-2026-12590","aliases":["GHSA-v422-hmwv-36x6"],"url":"https://o3.security/vulnerability/CVE-2026-12590","summary":"body-parser vulnerable to denial of service when invalid limit value silently disables size enforcement","details":"### Impact\n\nWhen 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.\n\nThis issue affects applications that pass a programmatically computed or user-configurable value to the `limit` option without validating it first.\n\n### Patches\n\nThis issue is fixed in [body-parser@2.3.0](https://github.com/expressjs/body-parser/releases/tag/v2.3.0) and [body-parser@1.20.6](https://github.com/expressjs/body-parser/releases/tag/v1.20.6) via [#698](https://github.com/expressjs/body-parser/pull/698). After the fix, invalid `limit` values throw a clear error at parser construction time instead of silently disabling enforcement. `null` and `undefined` continue to fall back to the default limit (`100kb`).\n\n### Workarounds\n\nValidate `limit` before passing it to body-parser. For example, parse the value with [`bytes.parse()`](https://github.com/visionmedia/bytes.js) at startup and reject any configuration where it returns `null` or a non-finite number.\n\n### References\n\n- [#698](https://github.com/expressjs/body-parser/pull/698): fix PR\n- [bytes.js](https://github.com/visionmedia/bytes.js): limit parser","published":"2026-07-09T10:21:10.447Z","modified":"2026-08-12T03:51:16.586222585Z","cvss":{"score":3.7,"severity":"LOW","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"},"epss":{"score":0.00412,"percentile":0.34718,"asOf":"2026-09-14"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"body-parser","fixedVersion":"1.20.6"},{"ecosystem":"npm","name":"body-parser","fixedVersion":"2.3.0"}],"fix":{"url":"https://github.com/expressjs/body-parser/pull/698","label":"expressjs/body-parser#698"},"references":[{"type":"ADVISORY","url":"https://cna.openjsf.org/security-advisories.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12590.json"},{"type":"ADVISORY","url":"https://github.com/expressjs/body-parser/security/advisories/GHSA-v422-hmwv-36x6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12590"},{"type":"WEB","url":"https://github.com/expressjs/body-parser/pull/698"},{"type":"WEB","url":"https://github.com/expressjs/body-parser/pull/741"},{"type":"WEB","url":"https://github.com/expressjs/body-parser/commit/2322e111cc321413ec2b7b76d01be533d3de9d7d"},{"type":"WEB","url":"https://github.com/expressjs/body-parser/commit/3492672eee593d5c158f239b6e9115498a5dbeac"},{"type":"PACKAGE","url":"https://github.com/expressjs/body-parser"},{"type":"WEB","url":"https://github.com/expressjs/body-parser/releases/tag/1.20.6"},{"type":"WEB","url":"https://github.com/expressjs/body-parser/releases/tag/v2.3.0"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:16.586222585Z"}}