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

High 7.5 Published Updated

An attacker can cause a Denial of Service in Open Policy Agent by triggering out-of-range memory access during expression parsing.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-28946?

CVE-2022-28946 is a high-severity denial of service vulnerability in n/a, published on 19 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue in the component ast/parser.go of Open Policy Agent v0.39.0 causes the application to incorrectly interpret every expression, causing a Denial of Service (DoS) via triggering out-of-range memory access.

Which versions are affected by CVE-2022-28946?

3 open source packages ship an affected version, including github.com/open-policy-agent/opa. It affects 1 product.

PackageAffectedFixed in
github.com/open-policy-agent/opa GoAll versions0.40.0
github.com/open-policy-agent/opa GoAll versions0.40.0
github.com/open-policy-agent/opa GoAll versions0.40.0
Linux distribution packages (2)
starboard openSUSE:TumbleweedAll versions0.15.6-1.1
trivy openSUSE:TumbleweedAll versions0.28.0-1.1

Products include Openpolicyagent Open Policy Agent.

How do I fix CVE-2022-28946?

Upgrade github.com/open-policy-agent/opa to 0.40.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-28946 being exploited?

There is no known exploitation of CVE-2022-28946 in the wild and no public exploit code.

Sources

Also known as GHSA-x7f3-62pm-9p38, GO-2022-0587, openSUSE-SU-2024:12102-1, openSUSE-SU-2024:12128-1.

Is CVE-2022-28946 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free