{"schema":"threatline.record/2","record":{"id":"CVE-2026-65838","aliases":["GHSA-8qqm-fp2q-v734","GO-2026-6019"],"summary":"Skipper: Incomplete fix for CVE-2026-50197: an oversized body can bypass OPA deny-on-presence Rego policies","details":"### Summary\n\nA wrong policy can be an open door. \nYou have to check `input.attributes.request.http.truncated_body` in your policy.\n\n### Description\n\nIncomplete fix for CVE-2026-50197: an oversized declared-`Content-Length` body still hands OPA an empty `parsed_body`, so deny-on-presence Rego policies fail OPEN while the full payload reaches upstream.\n\nThe CVE-2026-50197 fix (commit `3152f3b0`, PR #4041, v0.26.10) substituted `expectedSize = maxBodyBytes`\nonly when `req.ContentLength < 0` (chunked / HTTP/2 without content-length). But when a request declares a\n`Content-Length` larger than `maxBodyBytes`, `expectedSize > maxBodyBytes`, the body-extraction `if` is\nskipped entirely, and `ExtractHttpBodyOptionally` returns `rawBodyBytes = nil` — so OPA evaluates an empty\n`parsed_body`, while the full forbidden payload still flows to the upstream. A deny-on-presence policy\n(`default allow = true; allow = false if input.parsed_body.<forbidden>`) — the exact Rego shape the\nadvisory describes — fails OPEN. The fix's own comment reasons only about `ContentLength == -1`; the\noversized branch was never considered, and the added PoC test only covers small bodies.\n\n### Affected code\n\n- `filters/openpolicyagent/openpolicyagent.go` `ExtractHttpBodyOptionally`: the\n  `expectedSize <= maxBodyBytes` gate lets an oversized declared body fall through to\n  `return req.Body, nil, func() {}, nil` (OPA sees an empty document).\n- Corroborated by Skipper's own unit test \"Read body exhausting max bytes\" (`{ \"welcome\": \"world\" }`,\n  `maxBodySize: 5` → `bodyInPolicy: \"\"`).\n\n### Steps to reproduce\n\nSee attached `docker-compose.yml` (official `golang` image) + `setup.sh` + `exploit.sh`, which run a real\nSkipper proxy (`proxytest`) with a real OPA control plane (`opasdktest`),\n`WithMaxRequestBodyBytes(32)`, policy `allow = false if input.parsed_body.action == \"delete\"`, route\n`* -> opaAuthorizeRequestWithBody(\"test\") -> upstream`:\n- `{\"action\":\"delete\"}` (19B ≤ 32) → **403** (denied).\n- `{\"action\":\"delete\",\"pad\":\"X..64\"}` (> 32) → **200**, upstream received the full body (BYPASS).\n- small chunked `{\"action\":\"delete\"}` → **403** (positive control: the original CVE is fixed).\n\n(Library-tier: validated via Skipper's real proxy test harness, not a deploy of the official image; benign\noracle = status diff + upstream-received body; no RCE.)\n\n### Impact\n\nDeployments authorizing on request-body content via `opaAuthorizeRequestWithBody` + deny-on-presence Rego\ncan be bypassed by inflating the request body past `-open-policy-agent-max-request-body-size` (default\n1 MB); the full payload still reaches the upstream.\n\n### Mitigation\n\nDocument how policy owners should block requests with oversized body.\n\nExample deny by default and use \"allow if\" no oversized body:\n```rego\ndefault allow := false\n\nallow if {\n    input.attributes.request.http.truncated_body == false\n    # ... body-based conditions\n}\n```\n\nExample allow by default and use \"deny if\" an oversized body:\n```rego\ndefault deny := false\n\ndeny if {\n    input.attributes.request.http.truncated_body == true\n    # ... body-based conditions\n}\n```\n\nDocumentation is published by https://github.com/zalando/skipper/releases/tag/v0.27.26\n\n### Credit\n\nReported as part of an incomplete-patch measurement study (responsible disclosure).","categories":["Libraries & packages"],"product":"github.com/zalando/skipper","vendor":"zalando","ecosystem":"go","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-8qqm-fp2q-v734","source_modified_at":"2026-09-25T17:03:33Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"go","name":"github.com/zalando/skipper"},"range":"< 0.27.26"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-65838","source_modified_at":"2026-09-15T13:55:41.273Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"skipper","vendor":"zalando","versions":[{"version":"< 0.27.35","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-8qqm-fp2q-v734","source_modified_at":"2026-09-25T17:15:05.948244239Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"github.com/zalando/skipper","ecosystem":"Go","purl":"pkg:golang/github.com/zalando/skipper"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.27.26"}]}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-8qqm-fp2q-v734","source_modified_at":"2026-09-25T17:03:33Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"go","name":"github.com/zalando/skipper"},"version":"0.27.26"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-8qqm-fp2q-v734","source_modified_at":"2026-09-25T17:15:05.948244239Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"github.com/zalando/skipper","ecosystem":"Go","purl":"pkg:golang/github.com/zalando/skipper"},"version":"0.27.26"}],"cvss":8.2,"severity":"High","kev":{"listed":false},"epss":{"probability":0.00464,"percentile":0.39252,"score_date":"2026-10-23"},"published_at":"2026-09-14T20:01:27.862Z","modified_at":"2026-09-25T17:15:05.948244239Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-8qqm-fp2q-v734","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-25T17:03:33Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-65838","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-15T13:55:41.273Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-8qqm-fp2q-v734","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-25T17:15:05.948244239Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-65838","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/zalando/skipper/security/advisories/GHSA-8qqm-fp2q-v734","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/zalando/skipper/releases/tag/v0.27.26","source":"GitHub Advisory Database"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65838","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/zalando/skipper/commit/2cfceabaa6ff0af65b312dcb9bcbe84691b9d507","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/zalando/skipper/releases/tag/v0.27.35","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-8qqm-fp2q-v734","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"partial","assessed_at":"2026-09-15T13:26:56.403629Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-09-25T17:15:05.948244239Z","content_hash":"c63d030653111a18b7a60e96d6cd2302370a8c74ede4ae5f3e9cefcec470851b"}}
