Summary
Skipper's OPA authorization filter may evaluate only a truncated prefix of an oversized request body while treating the body as complete. Under affected HTTP/1.1 chunked or HTTP/2 request conditions, a body-inspecting policy may approve the request before the full body is forwarded to the protected upstream.
Affected context
The issue occurs in Skipper deployments using the opaAuthorizeRequestWithBody filter with body-inspecting Open Policy Agent policies. Risk is present when requests can exceed the configured body inspection limit and the request uses HTTP/1.1 chunked transfer encoding or HTTP/2 without a Content-Length header, allowing the truncation signal to differ from the bytes actually read.
Exploit preconditions
- Attack surface: HTTP requests processed by Skipper's OPA body-authorization filter
- Required access: Ability to send requests through the affected Skipper route; separate policy or application authorization may still apply
- Trigger point: OPA evaluation after Skipper truncates the body presented for inspection
- Why exploitation is possible: The
input.truncated_bodysignal can be derived from an unavailable or non-reflective Content-Length value rather than the actual body read result, causing a policy to evaluate an incomplete prefix while the full body is forwarded
Why this happens
The underlying bug is an authorization decision based on incomplete request data combined with an inaccurate truncation indicator. When the adapter copies headers without adding a Content-Length that represents the truncated body, policies that permit only input.truncated_body == false may incorrectly treat a truncated inspection input as complete. This maps to CWE-863, Incorrect Authorization, because the authorization decision can be made from insufficiently represented request content.
Potential impact
- An unauthorized or insufficiently inspected request may reach a protected upstream
- Application-level authorization controls could be bypassed for oversized requests
- Malicious request content beyond the inspected prefix could influence downstream processing
- Backend services could receive payloads that the OPA policy did not fully evaluate
- Security, auditing, or content-validation assumptions could be weakened
General mitigation guidance
Mitigation generally focuses on ensuring authorization decisions use the complete
security-relevant request content or fail closed when inspection is incomplete.
Common defensive patterns include:
- Treating any body truncation, unknown length, or incomplete inspection as an authorization failure
- Rejecting or separately handling oversized requests before policy evaluation
- Deriving truncation state from the actual bytes read rather than relying only on request headers
- Avoiding policies that assume absent or inconsistent length metadata means the body is complete
- Enforcing consistent request-size limits at the proxy and upstream boundaries
- Applying least privilege to routes and backend identities so an authorization mistake has limited reach
- Using downstream validation as defense in depth rather than as a substitute for complete proxy authorization
How teams detect issues like this
Detection can combine implementation review, policy analysis, and runtime monitoring.
- Use static analysis to identify authorization decisions that depend on incomplete,
truncated, or header-derived request bodies.
- Review code paths where body limits, transfer encoding, HTTP/2 framing, and
Content-Length handling interact.
- Flag OPA policies that explicitly permit requests when truncation is false
without independently enforcing size or completeness guarantees.
- Add tests covering oversized bodies sent with chunked HTTP/1.1 and HTTP/2
requests without Content-Length.
- Monitor discrepancies between bytes inspected by the policy engine and bytes
forwarded upstream.
- Enforce policy rules requiring complete body inspection for security-sensitive
routes; automated review tools may help identify inconsistent handling.

