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

> Attackers can inject Rego code via HTTP paths in OPA server, causing denial of service or erroneous policy decisions.

- **Severity:** High 7.4 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 May 2025
- **Updated:** 2 May 2025
- **Also known as:** AZL-63067, CLEANSTART-2026-OK69185, CLEANSTART-2026-PU21054, ECHO-4d87-77fe-13dc, GHSA-6m8w-jc87-6cr7, GO-2025-3660, MINI-4j67-722g-c77x, MINI-6cgj-gjm6-vrw7, MINI-9wcp-qh5r-r684, MINI-g75w-2fjp-3h65, MINI-jjfq-m9hx-qfjg, MINI-jm7x-f694-v78r, MINI-r8qh-r22g-76pj, MINI-xc26-xc22-vrh5, SUSE-SU-2025:02592-1, openSUSE-SU-2025:15355-1, openSUSE-SU-2025:15370-1, openSUSE-SU-2025:15530-1

## What is CVE-2025-46569?

CVE-2025-46569 is a high-severity code injection vulnerability in open-policy-agent opa, published on 1 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### 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.

Weakness: CWE-94 (Improper Control of Generation of Code), CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2025-46569?

7 open source packages ship an affected version, including github.com/open-policy-agent/opa, github.com/open-policy-agent/opa/server and github.com/open-policy-agent/opa/v1/server.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/open-policy-agent/opa` | Go | All versions | 1.4.0 |
| `github.com/open-policy-agent/opa` | Go | All versions | 1.4.0 |
| `github.com/open-policy-agent/opa` | Go | All versions | 1.4.0 |
| `github.com/open-policy-agent/opa/server` | Go | All versions | 1.4.0 |
| `github.com/open-policy-agent/opa/server` | Go | All versions | 1.4.0 |
| `github.com/open-policy-agent/opa/v1/server` | Go | All versions | 1.4.0 |
| `github.com/open-policy-agent/opa/v1/server` | Go | All versions | 1.4.0 |
| `cosign` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Manager Proxy 4.3 | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | SUSE:Manager Server 4.3 | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | openSUSE:Leap 15.6 | All versions | 2.5.3-150400.3.30.1 |
| `cosign` | openSUSE:Tumbleweed | All versions | 2.5.3-1.1 |
| `hauler` | openSUSE:Tumbleweed | All versions | 1.2.5-1.1 |
| `trivy` | openSUSE:Tumbleweed | All versions | 0.65.0-2.1 |

## How do I fix CVE-2025-46569?

Upgrade github.com/open-policy-agent/opa to 1.4.0 or later.

## Is CVE-2025-46569 being exploited?

There is no known exploitation of CVE-2025-46569 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-46569 and fix it if it is affected.

What it is: CVE-2025-46569 is a high-severity code injection vulnerability in open-policy-agent opa, published on 1 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-46569 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/open-policy-agent/opa (Go): affected all versions; fixed in 1.4.0
- github.com/open-policy-agent/opa (Go): affected all versions; fixed in 1.4.0
- github.com/open-policy-agent/opa (Go): affected all versions; fixed in 1.4.0
- github.com/open-policy-agent/opa/server (Go): affected all versions; fixed in 1.4.0
- github.com/open-policy-agent/opa/server (Go): affected all versions; fixed in 1.4.0
- github.com/open-policy-agent/opa/v1/server (Go): affected all versions; fixed in 1.4.0
- github.com/open-policy-agent/opa/v1/server (Go): affected all versions; fixed in 1.4.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-46569/ (Markdown: https://insights.sbomify.com/CVE-2025-46569/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-46569
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-46569
- OSV: https://osv.dev/vulnerability/CVE-2025-46569

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-46569/
Summaries are generated and may contain mistakes; the official description above is the record.
