GHSA-qmch-v2q9-wg4p
HIGHCedarJava has policy injection vulnerability
Blast Radius
com.cedarpolicy:cedar-java☕com.cedarpolicy:cedar-java☕com.cedarpolicy:cedar-javaReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Summary
CedarJava is an open source Java implementation of the Cedar policy language, used for fine-grained authorization decisions. Under certain circumstances, improper input handling could allow policy injection.
Impact
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.
Impacted versions:
< 4.9
Patches
Addressed in CedarJava version 2.3.6, 3.4.1, and 4.9 and above. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
Workarounds
Validate and sanitize all user-supplied input before passing it to toCedarExpr(). Avoid building policy text at runtime from user-controlled values.
References
If you have any questions or comments about this advisory, we ask that you contact us directly via email to [email protected]. Please do not create a public GitHub issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | com.cedarpolicy:cedar-java | all versions | 2.3.6 |
| ☕Maven | com.cedarpolicy:cedar-java | ≥ 3.1.2&&< 3.4.1 | 3.4.1 |
| ☕Maven | com.cedarpolicy:cedar-java | ≥ 4.0.0&&< 4.9.0 | 4.9.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for com.cedarpolicy:cedar-java. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update com.cedarpolicy:cedar-java to 2.3.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qmch-v2q9-wg4p is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-qmch-v2q9-wg4p is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-qmch-v2q9-wg4p. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-qmch-v2q9-wg4p in your dependencies?
O3 detects GHSA-qmch-v2q9-wg4p across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.