GHSA-8qqm-fp2q-v734: Skipper: Incomplete fix for CVE-2026-50197: an oversized body can bypass OPA deny-on-presence Rego policies
Summary
A wrong policy can be an open door.
You have to check input.attributes.request.http.truncated_body in your policy.
Description
Incomplete 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.
The CVE-2026-50197 fix (commit 3152f3b0, PR #4041, v0.26.10) substituted expectedSize = maxBodyBytes
only when req.ContentLength < 0 (chunked / HTTP/2 without content-length). But when a request declares a
Content-Length larger than maxBodyBytes, expectedSize > maxBodyBytes, the body-extraction if is
skipped entirely, and ExtractHttpBodyOptionally returns rawBodyBytes = nil — so OPA evaluates an empty
parsed_body, while the full forbidden payload still flows to the upstream. A deny-on-presence policy
(default allow = true; allow = false if input.parsed_body.<forbidden>) — the exact Rego shape the
advisory describes — fails OPEN. The fix's own comment reasons only about ContentLength == -1; the
oversized branch was never considered, and the added PoC test only covers small bodies.
Affected code
- filters/openpolicyagent/openpolicyagent.go ExtractHttpBodyOptionally: the
expectedSize <= maxBodyBytes gate lets an oversized declared body fall through to
return req.Body, nil, func() {}, nil (OPA sees an empty document).
- Corroborated by Skipper's own unit test "Read body exhausting max bytes" ({ "welcome": "world" },
maxBodySize: 5 → bodyInPolicy: "").
Steps to reproduce
See attached docker-compose.yml (official golang image) + setup.sh + exploit.sh, which run a real
Skipper proxy (proxytest) with a real OPA control plane (opasdktest),
WithMaxRequestBodyBytes(32), policy allow = false if input.parsed_body.action == "delete", route
- -> opaAuthorizeRequestWithBody("test") -> upstream:
- {"action":"delete"} (19B ≤ 32) → 403 (denied).
- {"action":"delete","pad":"X..64"} (> 32) → 200, upstream received the full body (BYPASS).
- small chun
Details
Original advisory: https://github.com/advisories/GHSA-8qqm-fp2q-v734
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31