High, CVSS 7.4GoPublished
OPA server Data API HTTP path injection of Rego
CVE-2025-46569 · GHSA-6m8w-jc87-6cr7
- Affected
- Go github.com/open-policy-agent/opa/v1/server < 1.4.0
- Fixed in
- 1.4.0· Vendor fix available
- Issue
- Impact When run as a server, OPA exposes an HTTP Data API for reading and writing documents. Requesting a virtual document through the Data API entails policy evaluation, where a Rego query containing a single data document reference is constructed from the requested path. This query is then used for policy evaluation. A HTTP request path can be crafted in a way that injects Rego code into the constructed query. The evaluation result cannot be made to return any other data than what is generated by the requested path, but this path can be misdirected, and the injected Rego code can be crafted to make the query succeed or fail; opening up for oracle attacks or, given the right circumstances, erroneous policy decision results. Furthermore, the injected code can be crafted to be computationally expensive, resulting in a Denial Of Service (DoS) attack. Users are only impacted if all of the following apply: OPA is deployed as a standalone server (rather than being used as a Go library)…
Recommended action: Upgrade to 1.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.