CVE-2025-46569 Details
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.
A vulnerability in Open Policy Agent (OPA) prior to version 1.4.0 allows for injection of Rego code into queries constructed from HTTP request paths to the Data API. This injection can disrupt policy evaluations, potentially leading to oracle attacks or incorrect policy decisions. Additionally, the injected code could be made to consume significant computational resources, causing a Denial-of-Service (DoS) condition. The vulnerability exists when OPA is run as a server and the Data API is exposed to untrusted networks without proper authorization policies in place.
Users can upgrade to OPA version 1.4.0 or later, where this vulnerability has been patched. If an immediate upgrade is not possible, OPA's RESTful APIs should be kept private or restricted to trusted networks. Additionally, an authorization policy can be implemented to validate incoming request paths, ensuring they correspond to expected Rego references.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 1, 2025CISA-ADP
Assessed May 2, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/open-policy-agent/opa/commit/ad2063247a14711882f18c387a511fc8094aa79c | [email protected] | Source CodeVendor |
| https://github.com/open-policy-agent/opa/security/advisories/GHSA-6m8w-jc87-6cr7 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-863 | Incorrect Authorization | [email protected] |
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Open Policy Agent | < 1.4.0 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 1, 2025 | New CVE Received | [email protected] |
Volerion