CVEBrief

Home / open-policy-agent / opa / CVE-2022-36085

CVE-2022-36085: is it exploited, and which versions of open-policy-agent opa are affected and fixed?

CVE-2022-36085 is a protection mechanism failure vulnerability in open-policy-agent opa. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 10:08 UTC). Affected: github.com/open-policy-agent/opa from 0.40.0 before 0.43.1 (GitHub advisory GHSA-f524-rf33-2jjr). Fixed in 0.43.1 (GitHub advisory GHSA-f524-rf33-2jjr). Severity: High (7.4, CVSS 3.1, from GitHub_M).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 10:08 UTC, CVE record November 19, 2026, 07:14 UTC and NVD November 19, 2026, 07:45 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 10:08 UTC
Affected
github.com/open-policy-agent/opa from 0.40.0 before 0.43.1
GitHub advisory GHSA-f524-rf33-2jjr
Fixed in
0.43.1
GitHub advisory GHSA-f524-rf33-2jjr
Severity
High 7.4
CVSS 3.1 from GitHub_M
Exploit odds (EPSS)
1.68% in 30 days
higher than 78% of CVEs; FIRST, December 2, 2026

What is CVE-2022-36085?

OPA Compiler: Bypass of WithUnsafeBuiltins using `with` keyword to mock functions

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.

From the CVE record by GitHub_M, last updated April 22, 2025, 17:23 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
open-policy-agentopa>= 0.40.0, < 0.43.1

As the CVE record by GitHub_M states it, last updated April 22, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.

Which packages are affected, and in which version is each fixed?

EcosystemPackageAffectedFixed inAdvisory
Gogithub.com/open-policy-agent/opa>= 0.40.0, < 0.43.10.43.1GHSA-f524-rf33-2jjr

GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated January 23, 2024. Summary: OPA Compiler: Bypass of WithUnsafeBuiltins using "with" keyword to mock functions.

Which products and versions does the NVD list as affected?

VendorProductVersionsType
openpolicyagentopen policy agentfrom 0.40.0 before 0.43.1application

NVD analysis (status Modified), last modified June 17, 2026, 04:52 UTC.

How severe is CVE-2022-36085?

ScoreVersionVectorSource
High 7.4CVSS 3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NGitHub_M
Critical 9.8CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HNVD

Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.

What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.

Is CVE-2022-36085 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
CISA SSVC
Exploitation: poc; automatable: no; technical impact: total (CISA ADP, April 22, 2025)
EPSS
1.68% probability of exploitation activity in the next 30 days, percentile 77.6 (FIRST EPSS, scores of December 2, 2026)

What kind of flaw is it?

Where are the vendor advisories and references?

When was it published, and where is the official record?

Reserved
July 15, 2022
Published
September 8, 2022, 13:30 UTC
CVE record updated
April 22, 2025, 17:23 UTC by GitHub_M
NVD
Modified, last modified June 17, 2026, 04:52 UTC
Last checked
CVE list November 19, 2026, 07:14 UTC; NVD November 19, 2026, 07:45 UTC; KEV December 3, 2026, 10:08 UTC; EPSS December 2, 2026
Official record
cve.org · NVD

What other CVEs affect opa?

Every CVE in opa

Questions about CVE-2022-36085

Is CVE-2022-36085 exploited in the wild?

Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 10:08 UTC. FIRST's EPSS gives it a 1.68% chance of exploitation activity in the next 30 days (scores of December 2, 2026).

Which versions of open-policy-agent opa are affected by CVE-2022-36085?

github.com/open-policy-agent/opa from 0.40.0 before 0.43.1, per the GitHub advisory GHSA-f524-rf33-2jjr. The tables above give every range the sources list.

Which version fixes CVE-2022-36085?

0.43.1, per the GitHub advisory GHSA-f524-rf33-2jjr. Check the vendor's advisory before you rely on it.

How severe is CVE-2022-36085?

High (7.4, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.

Where is the official record of CVE-2022-36085?

The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.