Arbitrary Code Injection Affecting policy-controller package, versions <0.12.1-r1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.05% (15th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CHAINGUARDLATEST-POLICYCONTROLLER-10056849
  • published7 May 2025
  • disclosed1 May 2025

Introduced: 1 May 2025

NewCVE-2025-46569  (opens in a new tab)
CWE-94  (opens in a new tab)
CWE-863  (opens in a new tab)

How to fix?

Upgrade Chainguard policy-controller to version 0.12.1-r1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream policy-controller package and not the policy-controller package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

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.