{"id":"CVE-2026-44982","aliases":["CVE-2026-44982","GHSA-rw47-hm26-6wr7","GO-2026-5641"],"related":[],"kind":"vulnerability","state":"published","title":"CrowdSec AppSec silently drops request body for chunked / HTTP-2 requests","summary":"CrowdSec offers crowdsourced protection against malicious IPs. From 1.5.0 until 1.7.8, pkg/appsec/request.go NewParsedRequestFromRequest allocated a request body buffer from max(r.ContentLength, 0), so HTTP/1.1 requests using Transfer-Encoding: chunked and HTTP/2 requests without a content-length header produced an empty body and caused WAF rules targeting REQUEST_BODY, BODY_ARGS, ARGS_POST, JSON, or XML to be skipped. This issue is fixed in version 1.7.8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"CrowdSec offers crowdsourced protection against malicious IPs. From 1.5.0 until 1.7.8, pkg/appsec/request.go NewParsedRequestFromRequest allocated a request body buffer from max(r.ContentLength, 0), so HTTP/1.1 requests using Transfer-Encoding: chunked and HTTP/2 requests without a content-length header produced an empty body and caused WAF rules targeting REQUEST_BODY, BODY_ARGS, ARGS_POST, JSON, or XML to be skipped. This issue is fixed in version 1.7.8.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe CrowdSec AppSec component fails to read the HTTP request body for any request whose `Content-Length` is not positive — most notably HTTP/1.1 requests using `Transfer-Encoding: chunked` and HTTP/2 requests sent without a `content-length` header. Coraza is then evaluated against an empty body, so every WAF rule targeting `REQUEST_BODY`, `BODY_ARGS`, `ARGS_POST`, `JSON`, or `XML` silently fails to match.\n\nAn unauthenticated remote attacker can bypass the entire AppSec body-inspection pipeline  by changing a single framing header on an otherwise-malicious request. The bypassed request is forwarded as `allow` and produces no WAF log entry.\n\n## Affected versions\n\n- `github.com/crowdsecurity/crowdsec` — all releases up to and including **v1.7.7**.\n\n## Affected component\n\n`pkg/appsec/request.go`, function `NewParsedRequestFromRequest`.\n\n## Root cause\n\n```go\nfunc NewParsedRequestFromRequest(r *http.Request, logger *log.Entry) (ParsedRequest, error) {\n    var err error\n    contentLength := max(r.ContentLength, 0)\n    body := make([]byte, contentLength)\n    if r.Body != nil {\n        _, err = io.ReadFull(r.Body, body)\n        if err != nil {\n            return ParsedRequest{}, fmt.Errorf(\"unable to read body: %s\", err)\n        }\n        r.Body = io.NopCloser(bytes.NewBuffer(body))\n    }\n    ...\n}\n```\n\nGo's `net/http` server sets `r.ContentLength = -1` when the request uses `Transfer-Encoding: chunked` with no `Content-Length` header, or when an HTTP/2 request omits the `content-length` pseudo-header (DATA-frame-only body). With `ContentLength == -1`:\n\n1. `max(-1, 0)` evaluates to `0`.\n2. `make([]byte, 0)` allocates a zero-length slice.\n3. `io.ReadFull` on a zero-length buffer needs zero bytes and returns immediately without touching `r.Body`.\n4. The empty buffer is written back onto the request and onto the cloned request constructed later in the same function.\n\nEvery downstream consumer then sees an empty body. In the AppSec runner, `WriteRequestBody` is skipped because the parsed body has zero length, and `ProcessRequestBody` runs against nothing.\n\n## Impact\n\nEvery body-scanning rule is bypassed for any request whose framing makes `Content-Length` non-positive. In default CrowdSec deployments using the standard AppSec collections, the bypass affects any rule with `zones` containing `BODY_ARGS`, `JSON`, `XML`, `REQUEST_BODY`, or `ARGS_POST`.\n\nNo configuration option mitigates the issue — the defect is in the request parser, not in any ruleset. Bypassed requests do not produce a WAF log entry, so operators have no signal that rules are being skipped.\n\nHeader-only and URI-only rules are unaffected.\n\n## Workarounds\n\nNo complete workaround is available.","format":"markdown","source":"ghsa"},{"lang":"en","text":"CrowdSec AppSec silently drops request body for chunked / HTTP-2 requests in github.com/crowdsecurity/crowdsec","format":"markdown","source":"go"},{"lang":"es","text":"CrowdSec ofrece protección colaborativa contra IPs maliciosas. Desde la versión 1.5.0 hasta la 1.7.8, pkg/appsec/request.go NewParsedRequestFromRequest asignaba un búfer para el cuerpo de la solicitud a partir de max(r.ContentLength, 0), por lo que las solicitudes HTTP/1.1 que utilizaban Transfer-Encoding: chunked y las solicitudes HTTP/2 sin una cabecera content-length producían un cuerpo vacío y hacían que las reglas del WAF dirigidas a REQUEST_BODY, BODY_ARGS, ARGS_POST, JSON o XML fueran omitidas. Este problema está solucionado en la versión 1.7.8.","source":"nvd"}],"published":"2026-05-27T19:58:15.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"}],"cwes":["CWE-693"],"affected":[{"ranges":[{"version":">= 1.5.0, < 1.7.8","status":"affected"}],"vendor":"crowdsecurity","product":"crowdsec","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.5.0","status":"affected","fixed":"1.7.8"}],"ecosystem":"Go","package":"github.com/crowdsecurity/crowdsec","purl":"pkg:golang/github.com/crowdsecurity/crowdsec","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.5.0","status":"affected","fixed":"1.7.8"}],"ecosystem":"Go","package":"github.com/crowdsecurity/crowdsec","purl":"pkg:golang/github.com/crowdsecurity/crowdsec","source":"go"}],"references":[{"url":"https://github.com/crowdsecurity/crowdsec/security/advisories/GHSA-rw47-hm26-6wr7","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/crowdsecurity/crowdsec/pull/4355","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/crowdsecurity/crowdsec/commit/3d5c4d9b127091e9063b9b5eb785372a599a4435","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/crowdsecurity/crowdsec/commit/57a793548671e6bbd2cde5562fe87b856ec9c642","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/crowdsecurity/crowdsec/releases/tag/v1.7.8","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/crowdsecurity/crowdsec","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-17T15:01:48.918Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44982","url":"https://www.cve.org/CVERecord?id=CVE-2026-44982","licence":"CVE Terms of Use","modified":"2026-07-17T15:01:59.005Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rw47-hm26-6wr7","url":"https://github.com/advisories/GHSA-rw47-hm26-6wr7","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:30.642Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5641","url":"https://pkg.go.dev/vuln/GO-2026-5641","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:37.452Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44982","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44982","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.427Z","epss":{"score":0.00217,"percentile":0.12974,"date":"2026-12-01T12:00:22.000Z"}}