CVE-2022-23628

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-23628
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-23628.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-23628
Aliases
Related
Published
2022-02-09T22:15:07Z
Modified
2025-01-08T14:06:56.287795Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/open-policy-agent/opa

Affected ranges

Type
GIT
Repo
https://github.com/open-policy-agent/opa
Events

Affected versions

v0.*

v0.1.0
v0.1.0-rc1
v0.1.0-rc2
v0.1.0-rc3
v0.10.0
v0.10.1
v0.10.2
v0.10.3
v0.10.4
v0.10.5
v0.10.6
v0.10.7
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.15.0
v0.15.1
v0.16.0
v0.17.0
v0.17.1
v0.17.2
v0.18.0
v0.19.0
v0.19.0-rc1
v0.19.1
v0.2.0
v0.2.1
v0.2.2
v0.20.0
v0.20.1
v0.20.2
v0.21.0
v0.22.0
v0.23.0
v0.24.0
v0.25.0
v0.25.0-rc1
v0.25.0-rc3
v0.25.0-rc4
v0.25.1
v0.25.2
v0.26.0
v0.27.0
v0.27.1
v0.28.0
v0.29.0
v0.29.1
v0.29.2
v0.29.3
v0.29.4
v0.3.0
v0.3.1
v0.30.0
v0.30.0-rc0
v0.30.1
v0.31.0
v0.32.0
v0.33.0
v0.34.0
v0.35.0
v0.36.0
v0.4.0
v0.4.1
v0.4.10
v0.4.2
v0.4.3
v0.4.4
v0.4.5
v0.4.6
v0.4.7
v0.4.8
v0.4.9
v0.5.0
v0.5.1
v0.5.10
v0.5.11
v0.5.12
v0.5.13
v0.5.2
v0.5.3
v0.5.4
v0.5.5
v0.5.6
v0.5.7
v0.5.8
v0.5.9
v0.6.0
v0.7.0
v0.7.1
v0.8.0
v0.8.1
v0.8.2
v0.9.0
v0.9.1
v0.9.2
v0.9.3-rc1
v0.9.3-rc2
v0.9.3-rc3