CVE-2026-111181: body-parser vulnerable to Denial of Service via trailing bytes after a compressed request body
A single request can crash any application using body-parser with default options. When a request carries a Content-Encoding (for example gzip), body-parser pipes it into a decompression stream and, after reading the body, leaves that stream piped with no error listener. A payload of one valid compressed frame followed by trailing bytes decodes and the application responds normally, but the trailing bytes then reach the already-finished decoder, which emits an error that is re-thrown as an uncaught exception and terminates the process. No authentication or matching route is required, since parsing runs before routing.
References
- cna.openjsf.org/security-advisories.html
- github.com/advisories/GHSA-27r3-jxmh-p828
- github.com/expressjs/body-parser/commit/1260c3845f54502a05a87594f09a334786bb34d7
- github.com/expressjs/body-parser/commit/f7075eae3a84c3473ab4bf0a777da28db208e916
- github.com/expressjs/body-parser/releases/tag/1.20.9
- github.com/expressjs/body-parser/releases/tag/v2.4.0
- github.com/expressjs/body-parser/security/advisories/GHSA-27r3-jxmh-p828
- nvd.nist.gov/vuln/detail/CVE-2026-111181
Code Behaviors & Features
Detect and mitigate CVE-2026-111181 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →