jinjava <2.8.1 Enables class deserialization via ObjectMapper – RCE risk
CVE-2025-59340 Published on September 17, 2025
jinjava Sandbox Bypass via JavaType-Based Deserialization
jinjava is a Java-based template engine based on django template syntax, adapted to render jinja templates. Priori to 2.8.1, by using mapper.getTypeFactory().constructFromCanonical(), it is possible to instruct the underlying ObjectMapper to deserialize attacker-controlled input into arbitrary classes. This enables the creation of semi-arbitrary class instances without directly invoking restricted methods or class literals. As a result, an attacker can escape the sandbox and instantiate classes such as java.net.URL, opening up the ability to access local files and URLs(e.g., file:///etc/passwd). With further chaining, this primitive can potentially lead to remote code execution (RCE). This vulnerability is fixed in 2.8.1.
Vulnerability Analysis
CVE-2025-59340 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to be critical as this vulnerability has a high impact to the confidentiality, integrity and availability of this component.
Weakness Type
Affected Versions
HubSpot jinjava Version < 2.8.1 is affected by CVE-2025-59340Vulnerable Packages
The following package name and versions may be associated with CVE-2025-59340
| Package Manager | Vulnerable Package | Versions | Fixed In |
|---|---|---|---|
| maven | com.hubspot.jinjava:jinjava | = 2.8.0 | 2.8.1 |
| maven | com.hubspot.jinjava:jinjava | < 2.7.5 | 2.7.5 |
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.