Vulnerability · Published May 1, 2025 · Assigned by GitHub_M
CVE-2025-46569OPA server Data API HTTP path injection of Rego
High 7.4
In plain English
A high-severity incorrect authorization in opa from open-policy-agent. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Open Policy Agent (OPA) is an open source, general-purpose policy engine. Prior to version 1.4.0, 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. This issue has been patched in version 1.4.0. A workaround involves having network access to OPA’s RESTful APIs being limited to `localhost` and/or trusted networks, unless necessary for production reasons.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/open-policy-agent/opa | 1.4.0 | GHSA-6m8w-jc87-6cr7 |
| Go | github.com/open-policy-agent/opa | 1.4.0 | GO-2025-3660 |
| Go | github.com/open-policy-agent/opa/server | 1.4.0 | GHSA-6m8w-jc87-6cr7 |
| Go | github.com/open-policy-agent/opa/v1/server | 1.4.0 | GHSA-6m8w-jc87-6cr7 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| open-policy-agent | opa | < 1.4.0 |
Weakness: CWE-863, CWE-94 · Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:H/SC:H/SI:H/SA:H