{"id":"CVE-2026-111181","aliases":["CVE-2026-111181","GHSA-27r3-jxmh-p828"],"related":[],"kind":"vulnerability","state":"published","title":"body-parser vulnerable to Denial of Service via trailing bytes after a compressed request body","summary":"body-parser is body parsing middleware for Node.js and Express. In versions before 1.20.9 and in versions from 2.0.0 before 2.4.0, a single request can crash any application using body-parser with default options. When a request carries a Content-Encoding such as gzip, body-parser pipes it into a decompression stream and, after reading the body, leaves that stream 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 matching route is required because body parsing runs before routing, so any endpoint that parses a body is affected. The issue is fixed in body-parser 2.4.0 and 1.20.9, and users should upgrade to one of those versions or later. As a workaround, disable request-body inflation (set the body-parser inflate option to false) so encoded requests are rejected before any decompression stream is created.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"body-parser is body parsing middleware for Node.js and Express. In versions before 1.20.9 and in versions from 2.0.0 before 2.4.0, a single request can crash any application using body-parser with default options. When a request carries a Content-Encoding such as gzip, body-parser pipes it into a decompression stream and, after reading the body, leaves that stream 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 matching route is required because body parsing runs before routing, so any endpoint that parses a body is affected. The issue is fixed in body-parser 2.4.0 and 1.20.9, and users should upgrade to one of those versions or later. As a workaround, disable request-body inflation (set the body-parser inflate option to false) so encoded requests are rejected before any decompression stream is created.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA 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.\n\n### Patches\n\nFixed in body-parser 2.4.0 and 1.20.9. Upgrade to one of these versions.\n\n### Workarounds\n\nPass `inflate: false` to the body-parser middleware if the application does not need to accept compressed request bodies. This rejects encoded requests before any decompression stream is created.","format":"markdown","source":"ghsa"}],"published":"2026-10-22T14:29:56.577Z","modified":"2026-10-23T21:00:06.131Z","severity":{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-248"],"affected":[{"ranges":[{"type":"semver","introduced":"2.0.0","fixed":"2.4.0","status":"affected"},{"type":"semver","version":"2.4.0","status":"unaffected"},{"type":"semver","introduced":"0","fixed":"1.20.9","status":"affected"},{"type":"semver","version":"1.20.9","status":"unaffected"}],"vendor":"body-parser","product":"body-parser","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.4.0"}],"ecosystem":"npm","package":"body-parser","purl":"pkg:npm/body-parser","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.20.9"}],"ecosystem":"npm","package":"body-parser","purl":"pkg:npm/body-parser","source":"ghsa"}],"references":[{"url":"https://github.com/expressjs/body-parser/security/advisories/GHSA-27r3-jxmh-p828","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-111181","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/expressjs/body-parser/commit/1260c3845f54502a05a87594f09a334786bb34d7","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/expressjs/body-parser/commit/f7075eae3a84c3473ab4bf0a777da28db208e916","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/expressjs/body-parser","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/expressjs/body-parser/releases/tag/1.20.9","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/expressjs/body-parser/releases/tag/v2.4.0","tags":["web"],"sources":["ghsa"]}],"credits":["blue2cat","UlisesGascon","bjohansebas","Phillip9587"],"assigner":"openjs","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-10-22T18:26:41.855Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-111181","url":"https://www.cve.org/CVERecord?id=CVE-2026-111181","licence":"CVE Terms of Use","modified":"2026-10-22T19:00:31.729Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-27r3-jxmh-p828","url":"https://github.com/advisories/GHSA-27r3-jxmh-p828","licence":"CC-BY-4.0","modified":"2026-10-23T21:00:06.131Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-111181","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-111181","licence":"Public domain","modified":"2026-10-22T19:17:35.797Z"}],"updatedAt":"2026-11-25T22:59:46.782Z","epss":{"score":0.00473,"percentile":0.425,"date":"2026-12-01T12:00:22.000Z"}}