patchminder
Proof of concept · CISA assessment CVE-2022-36085

Vulnerabilityin open-policy-agent opa.

Published 8 Sep 2022 · Updated 22 Apr 2025 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Proof of concept public (CISAThe US cyber defence agency. Its list names every hole it has seen used in real attacks. assessment).

Severity
High 7.4
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1 · no login needed
Attack likelihood
Moderate
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 1.7% chance in 30 days · 4 Dec 2026
Fix
Available
Fixed in 0.43.1, 0.44.0
In plain words

Open Policy Agent (OPA) is an open source, general-purpose policy engine. The Rego compiler provides a (deprecated) `WithUnsafeBuiltins` function, which allows users to provide a set of built-in functions that should be deemed unsafe · and as such rejected · by the compiler if encountered in the policy compilation stage. A bypass of this protection has been found, where the use of the `with` keyword to mock such a built-in function (a feature introduced in OPA v0.40.0), isn’t taken into account by `WithUnsafeBuiltins`. Multiple conditions need to be met in order to create an adverse effect. Version 0.43.1 contains a patch for this issue. As a workaround, avoid using the `WithUnsafeBuiltins` function and use the `capabilities` feature instead.

What to do now
  • Upgrade opa to 0.43.1 or later.
  • Upgrade github.com/open-policy-agent/opa (Go) to 0.43.1, 0.44.0 or later, whichever matches your release line.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
opa
0.40.0 to before 0.43.1
0.43.1
CVE record
github.com/open-policy-agent/opa (Go)
0.40.0 to before 0.43.1
0.43.1
GitHub advisory
github.com/open-policy-agent/opa (Go)
0.40.0 to before 0.44.0
0.44.0
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 15 Jul 2022
    CVE ID reserved by GitHub_M.
  2. 8 Sep 2022
    Published in the CVE List.
  3. 22 Apr 2025
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Proof of concept (CISA assessment). CISA assessment (SSVC): exploitation poc.

Metasploit module
None known
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
None known

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other opa vulnerabilities

Same weakness: Protection mechanism failure

All CWE-693 vulnerabilities

References
Cite this page

Patchminder. CVE-2022-36085: Vulnerability in open-policy-agent opa. https://patchminder.com/cve/cve-2022-36085/ (accessed 5 December 2026).