npm / body-parser
body-parser
What changed in body-parser 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-22.
4 security1 new APIs and options3 performance2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbody-parser 210 changes
Security 4
A security fix addresses CVE-2026-111181.
A security fix addresses CVE-2026-12590.
Improves validation of the limit option as a security fix.
body-parser is vulnerable to denial of service when url encoding is used
New APIs and options 1
Adds support for zstandard.
Performance 3
Avoids the first-character regex for direct JSON bodies.
A conditional check is eliminated from the JSON strict mode hot path.
The empty-body guard is moved to avoid creating an extra function closure.
Fixes and other changes 2
Reading the body no longer mutates read options.
ESM compatibility is improved, making the package work better in ESM contexts.