[GHSA-8qqm-fp2q-v734] Skipper: Incomplete fix for CVE-2026-50197: an oversized body can bypass OPA deny-on-presence Rego policies - #9161
Conversation
There was a problem hiding this comment.
Pull request overview
Adds CWE classifications to the Skipper oversized-body authorization bypass advisory.
Changes:
- Adds four proposed CWE mappings.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Note for reviewers: this supersedes #9160 (now closed), which was the original improvement for this advisory. #9160 carried two problems that are fixed here:
Resulting set: CWE-636 (primary, fail-open) · CWE-863 (incorrect authorization) · CWE-754 (unhandled oversized branch in the incomplete CVE-2026-50197 fix). Affected range intentionally unchanged: the pre-fix v0.26.9 gate was |
|
Created #9162 for the same |
Updates
Comments
This advisory currently has no CWE assigned (
"cwe_ids": []). Proposing four, primary first, based on the advisory description and the pre-/post-fix source.CWE-636 (Not Failing Securely, 'Failing Open') — primary. The advisory's own wording is that deny-on-presence Rego policies "fail OPEN": on the oversized-body path OPA receives an empty
parsed_body, so the authorization decision falls back to the more permissive outcome while the full payload still reaches the upstream.CWE-863 (Incorrect Authorization). The authorization check does execute — it just evaluates an empty document and therefore decides incorrectly. This fits better than CWE-285, since the check is performed rather than skipped.
CWE-130 (Improper Handling of Length Parameter Inconsistency). Root cause is the handling of a declared
Content-Lengthinconsistent with the bytes actually made available to the policy engine. In v0.27.25,filters/openpolicyagent/openpolicyagent.gosetsexpectedSize := req.ContentLength, special-cases onlyexpectedSize < 0(chunked / HTTP/2), then gates body extraction onexpectedSize <= opa.maxBodyBytes; a declaredContent-Lengthgreater thanmaxBodyBytesskips extraction entirely and yields a nil body.CWE-754 (Improper Check for Unusual or Exceptional Conditions). The incomplete CVE-2026-50197 fix reasoned only about the
ContentLength == -1case; the oversized-declared-length branch was never handled, and the accompanying regression test covered only small bodies.Fix confirmation: v0.27.26 removes the
expectedSize <= maxBodyBytesgate so oversized bodies are read and truncated tomaxBodyBytes, letting the policy compare bytes-read against the declaredContent-Length.Affected range left unchanged: the pre-fix v0.26.9 gate was
req.ContentLength <= opa.maxBodyBytes, so an oversized declaredContent-Lengthfell through there too. The bypass predates the CVE-2026-50197 fix, so"introduced": "0"is correct.