Cedar-policy cedar-java
CedarJava has a policy injection vulnerability
CedarJava is an open source Java implementation of the Cedar policy language, used for fine-grained authorization decisions. In versions prior to 2.3.6, 3.4.1 and 4.9.0, under certain circumstances, improper input handling could allow Cedar-expression injection via unescaped toCedarExpr(). The toCedarExpr() method on Cedar Value types does not escape special characters (" or \) when converting values to Cedar source code. If an integrator uses toCedarExpr() to build policy text at runtime from user-controlled values, an actor could inject arbitrary Cedar expressions. For example, injecting || true into a permit ... when { ... } clause could make the permit unconditional, or injecting && false into a forbid clause could prevent the forbid from triggering. This issue requires the integrator to use toCedarExpr() to build policy text at runtime from user-controlled input. This vulnerability has been fixed in versions 2.3.6, 3.4.1, and 4.9.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.3.6
- >= 3.1.2, < 3.4.1
- >= 4.0.0, < 4.9.0
Fixed in 2.3.6, 3.4.1, 4.9.0
Mitigation
Upgrade cedar-java to 2.3.6 or 3.4.1 or 4.9.0 or later.
References
- Vendor advisory github.com/cedar-policy/cedar-java/security/ad…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.