CyberAlerts is shutting down on June 30th, 2025. Thank you for your support!

CVE-2025-46569: OPA server Data API HTTP path injection of Rego

7.4 CVSS

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.

Classification

CVE ID: CVE-2025-46569

CVSS Base Severity: HIGH

CVSS Base Score: 7.4

CVSS 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

Problem Types

CWE-863: Incorrect Authorization CWE-94: Improper Control of Generation of Code ('Code Injection')

Affected Products

Vendor: open-policy-agent

Product: opa

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.02% (probability of being exploited)

EPSS Percentile: 2.2% (scored less or equal to compared to others)

EPSS Date: 2025-05-30 (when was this score calculated)

References

https://nvd.nist.gov/vuln/detail/CVE-2025-46569
https://github.com/open-policy-agent/opa/security/advisories/GHSA-6m8w-jc87-6cr7
https://github.com/open-policy-agent/opa/commit/ad2063247a14711882f18c387a511fc8094aa79c

Timeline