HubSpot Jinjava
cpe:2.3:a:hubspot:jinjava:*:*:*:*:*:*:*
- >= 2.8.0, < 2.8.3
- < 2.7.6
A critical vulnerability allowing arbitrary Java execution has been identified in JinJava, a template engine that renders Jinja templates using Django syntax. This issue affects JinJava versions 2.8.0 prior to 2.8.3 and all 2.7.x versions prior to 2.7.6. The vulnerability arises from a sandbox bypass through the ForTag class, which fails to enforce property access restrictions. As a result, it allows unauthorized access to Java object properties, instantiation of arbitrary classes, and file access, circumventing built-in security measures.
Exploitation of this vulnerability could lead to unauthorized access to restricted Java properties, arbitrary class instantiation, file system access, and potentially executing arbitrary code on the server.
To reproduce this vulnerability, create or edit a Jinja template that includes a for loop iterating over object properties. The ForTag class will not enforce property access restrictions, allowing access to arbitrary getter methods. Additionally, the vulnerability can be reproduced by using the ObjectMapper class to deserialize JSON into Java objects, bypassing the sandbox's type allowlist and accessing restricted classes or methods.
Users should upgrade to JinJava version 2.8.3 or 2.7.6 to address this vulnerability.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.