Protection bypass in github.com/open-policy-agent/opa
Published 13 Sept 2022 · Updated 20 May 2024
Is your project on an affected github.com/open-policy-agent/opa?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=0.40.0 <0.44.0
- Fixed in
- 0.44.0
go get github.com/open-policy-agent/opa@v0.44.0Details
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 rejected by the compiler if encountered in the policy compilation stage.
A bypass of this protection is possible when using the "with" keyword to mock a built-in function that isn't taken into account by WithUnsafeBuiltins.
Is GO-2022-0978 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/open-policy-agent/opa, and gives you the command that fixes it.
More advisories for github.com/open-policy-agent/opa
- LowCVE-2025-46569OPA server Data API HTTP path injection of Rego in github.com/open-policy-agent/opa · 5 May 2025
- HighCVE-2025-46569OPA server Data API HTTP path injection of Rego · 1 May 2025
- LowCVE-2024-8260OPA for Windows has an SMB force-authentication vulnerability in github.com/open-policy-agent/opa · 20 Sept 2024
- MediumCVE-2024-8260OPA for Windows has an SMB force-authentication vulnerability · 30 Aug 2024
- LowCVE-2022-23628Incorrect calculation in github.com/open-policy-agent/opa · 27 Jul 2022
- HighCVE-2022-33082Denial of service in Open Policy Agent · 1 Jul 2022
References
- Advisorygithub.com/open-policy-agent/opa/security/advisories/GHSA-f524-rf33-2jjr
- Fixgithub.com/open-policy-agent/opa/pull/4540
- Fixgithub.com/open-policy-agent/opa/pull/4616
- Fixgithub.com/open-policy-agent/opa/commit/25a597bc3f4985162e7f65f9c36599f4f8f55823
- Fixgithub.com/open-policy-agent/opa/commit/3e8c754ed007b22393cf65e48751ad9f6457fee8
- Linkgithub.com/open-policy-agent/opa/releases/tag/v0.43.1
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.