Home / open-policy-agent / opa / CVE-2022-23628
CVE-2022-23628: is it exploited, and which versions of open-policy-agent opa are affected and fixed?
CVE-2022-23628 is an incorrect calculation vulnerability in open-policy-agent opa. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 11:08 UTC). Affected: github.com/open-policy-agent/opa from 0.33.1 before 0.37.2 (GitHub advisory GHSA-hcw3-j74m-qc58). Fixed in 0.37.2 (GitHub advisory GHSA-hcw3-j74m-qc58). Severity: Medium (6.3, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 11:08 UTC, CVE record November 19, 2026, 07:14 UTC and NVD November 19, 2026, 07:51 UTC.
What is CVE-2022-23628?
Array literal misordering in github.com/open-policy-agent/opa
OPA is an open source, general-purpose policy engine. Under certain conditions, pretty-printing an abstract syntax tree (AST) that contains synthetic nodes could change the logic of some statements by reordering array literals. Example of policies impacted are those that parse and compare web paths. **All of these** three conditions have to be met to create an adverse effect: 1. An AST of Rego had to be **created programmatically** such that it ends up containing terms without a location (such as wildcard variables). 2. The AST had to be **pretty-printed** using the `github.com/open-policy-agent/opa/format` package. 3. The result of the pretty-printing had to be **parsed and evaluated again** via an OPA instance using the bundles, or the Golang packages. If any of these three conditions are not met, you are not affected. Notably, all three would be true if using **optimized bundles**, i.e. bundles created with `opa build -O=1` or higher. In that case, the optimizer would fulfil condition (1.), the result of that would be pretty-printed when writing the bundle to disk, fulfilling (2.). When the bundle was then used, we'd satisfy (3.). As a workaround users may disable optimization when creating bundles.
From the CVE record by GitHub_M, last updated April 22, 2025, 18:22 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| open-policy-agent | opa | >= 0.33.1, < 0.37.0 |
As the CVE record by GitHub_M states it, last updated April 22, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Go | github.com/open-policy-agent/opa | >= 0.33.1, < 0.37.2 | 0.37.2 | GHSA-hcw3-j74m-qc58 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated May 20, 2024. Summary: Incorrect Calculation in github.com/open-policy-agent/opa.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| openpolicyagent | open policy agent | from 0.33.1 before 0.37.0 | application |
NVD analysis (status Modified), last modified June 17, 2026, 04:30 UTC.
How severe is CVE-2022-23628?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 6.3 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L | GitHub_M |
| Medium 5.3 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N | NVD |
| Medium 4.3 | CVSS 2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2022-23628 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: partial (CISA ADP, April 22, 2025)
- EPSS
- 1.03% probability of exploitation activity in the next 30 days, percentile 64.6 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-682 Incorrect Calculation
Where are the vendor advisories and references?
- https://github.com/open-policy-agent/opa/security/advisories/GHSA-hcw3-j74m-qc58 x_refsource_CONFIRM
- https://github.com/open-policy-agent/opa/pull/3851 x_refsource_MISC
- https://github.com/open-policy-agent/opa/commit/932e4ffc37a590ace79e9b75ca4340288c220239 x_refsource_MISC
- https://github.com/open-policy-agent/opa/commit/bfd984ddf93ef2c4963a08d4fdadae0bcf1a3717 x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- January 19, 2022
- Published
- February 9, 2022, 21:50 UTC
- CVE record updated
- April 22, 2025, 18:22 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 04:30 UTC
- Last checked
- CVE list November 19, 2026, 07:14 UTC; NVD November 19, 2026, 07:51 UTC; KEV December 3, 2026, 11:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect opa?
- Nov 26, 2026CVE-2026-137570 open-policy-agent opa: insecure temporary file
- May 1, 2025CVE-2025-46569 open-policy-agent opa: incorrect authorization
- Sep 8, 2022CVE-2022-36085 open-policy-agent opa: protection mechanism failure
Questions about CVE-2022-23628
Is CVE-2022-23628 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 11:08 UTC. FIRST's EPSS gives it a 1.03% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of open-policy-agent opa are affected by CVE-2022-23628?
github.com/open-policy-agent/opa from 0.33.1 before 0.37.2, per the GitHub advisory GHSA-hcw3-j74m-qc58. The tables above give every range the sources list.
Which version fixes CVE-2022-23628?
0.37.2, per the GitHub advisory GHSA-hcw3-j74m-qc58. Check the vendor's advisory before you rely on it.
How severe is CVE-2022-23628?
Medium (6.3, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2022-23628?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.