{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2022-36085","published":"2022-09-08T14:15:08.340000Z","last_modified":"2026-06-17T04:52:53.230000Z","status":"Modified","cvss":{"version":"3.1","score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-20","CWE-693"],"cpes":[{"criteria":"cpe:2.3:a:openpolicyagent:open_policy_agent:*:*:*:*:*:*:*:*","part":"a","vendor":"openpolicyagent","product":"open_policy_agent","version_start_including":"0.40.0","version_end_excluding":"0.43.1"}],"cpes_truncated":false,"vendors":["openpolicyagent"],"products":["openpolicyagent/open_policy_agent"],"ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"total"},"epss":{"score":0.01603,"percentile":0.76256,"date":"2026-11-29","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-f524-rf33-2jjr","ecosystem":"Go","name":"github.com/open-policy-agent/opa","purl":"pkg:golang/github.com/open-policy-agent/opa","ranges":[{"introduced":"0.40.0","fixed":"0.43.1"}],"versions":[],"versions_truncated":false},{"advisory":"GO-2022-0978","ecosystem":"Go","name":"github.com/open-policy-agent/opa","purl":"pkg:golang/github.com/open-policy-agent/opa","ranges":[{"introduced":"0.40.0","fixed":"0.44.0"}],"versions":[],"versions_truncated":false}],"severity":"critical","priority_score":74,"links":{"html_es":"/es/cve/CVE-2022-36085/","html_en":"/en/cve/CVE-2022-36085/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-36085","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-36085"},"untrusted":{"vendor_name":"Openpolicyagent","product_name":"Open Policy Agent","desc_en":"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.","affected":[{"untrusted_vendor":"open-policy-agent","untrusted_product":"opa","versions":[]}],"references":[{"url":"https://github.com/open-policy-agent/opa/commit/25a597bc3f4985162e7f65f9c36599f4f8f55823","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/open-policy-agent/opa/commit/3e8c754ed007b22393cf65e48751ad9f6457fee8","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/open-policy-agent/opa/pull/4540","tags":["Exploit","Patch","Third Party Advisory"]},{"url":"https://github.com/open-policy-agent/opa/pull/4616","tags":["Exploit","Patch","Third Party Advisory"]},{"url":"https://github.com/open-policy-agent/opa/releases/tag/v0.43.1","tags":["Third Party Advisory"]},{"url":"https://github.com/open-policy-agent/opa/security/advisories/GHSA-f524-rf33-2jjr","tags":["Exploit","Patch","Third Party Advisory"]}]}}