CVE
GHSA-mg8w-mq9r-f9c6
GraphHopper validates the if and else_if conditions of a custom model with an allow-list visitor over the parsed expression, but ConditionalExpressionVisitor.parse then builds the Java source handed to the Janino compiler by copying the original user-supplied text rather than the validated tree. Operators the visitor never allowed, such as bitwise and shift operators, and text it never inspected therefore reach the compiler, so a crafted condition can inject arbitrary Java code. An attacker who can submit a custom model to the routing endpoint can execute code on the server.
Package Versions Affected
Package Version
patch Availability
No items found.
Automatically patch vulnerabilities without upgrading
Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request
CVSS Version
Severity
Base Score
CVSS Version
Score Vector

C
H
U
-

C
H
U
-

C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Related Resources
No items found.
References
https://github.com/advisories/GHSA-mg8w-mq9r-f9c6, https://github.com/graphhopper/graphhopper/security/advisories/GHSA-mg8w-mq9r-f9c6, https://github.com/graphhopper/graphhopper/releases/tag/11.1