Miggo Logo

CVE-2022-33082: Denial of service in Open Policy Agent

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.53647%
Published
7/1/2022
Updated
5/20/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/open-policy-agent/opago< 0.42.00.42.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from missing shadowing checks in the AST parser's variable rewriting logic. The commit diff shows a new case was added to handle Call terms in rewriteDeclaredVarsInTerm, which walks function call references to detect shadowed variables. Prior to this fix, the compiler would allow shadowing of called functions in comprehension heads (like input() | input := 1), leading to invalid type conversions (Var treated as Ref) during subsequent compilation stages. The panic observed in CVE-2022-33082 occurs when the compiler tries to access operator information from what it expects to be a Ref but is actually a shadowed Var.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*n issu* in t** *ST p*rs*r (*st/*ompil*.*o) o* Op*n Poli*y ***nt v*.**.* *llows *tt**k*rs to **us* * **ni*l o* S*rvi** (*oS) vi* * *r**t** input.

Reasoning

T** vuln*r**ility st*ms *rom missin* s***owin* ****ks in t** *ST p*rs*r's v*ri**l* r*writin* lo*i*. T** *ommit *i** s*ows * n*w **s* w*s ***** to **n*l* **ll t*rms in `r*writ****l*r**V*rsInT*rm`, w*i** w*lks `*un*tion` **ll r***r*n**s to **t**t s***o