LowGO-2022-0587CVE-2022-28946GHSA-x7f3-62pm-9p38

Out of bounds memory access in github.com/open-policy-agent/opa

Published 20 May 2022 · Updated 4 Feb 2026

Is your project on an affected github.com/open-policy-agent/opa?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

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
Fixed in
0.40.0
Update to the fixed version for your release line, for example:go get github.com/open-policy-agent/opa@v0.40.0

Details

An issue in ast.Parser in Open Policy Agent causes the application to incorrectly interpret expressions, allowing a Denial of Service (DoS) via triggering out-of-range memory access.

Is GO-2022-0587 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
  • HighCVE-2022-36085OPA Compiler: Bypass of WithUnsafeBuiltins using "with" keyword to mock functions · 16 Sept 2022
  • LowCVE-2022-36085Protection bypass in github.com/open-policy-agent/opa · 13 Sept 2022
All 11 advisories for github.com/open-policy-agent/opa

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.