
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-59340 affects jinjava, a Java-based template engine based on django template syntax. The vulnerability was discovered and disclosed in September 2025, affecting all versions prior to 2.8.1. The vulnerability exists in the template engine's sandbox implementation, which fails to properly restrict access to certain dangerous functionalities (GitHub Advisory).
The vulnerability stems from insufficient sandbox restrictions in jinjava's implementation. While the sandbox prevents direct access to dangerous methods like getClass() and blocks Class object instantiation, it can be bypassed using mapper.getTypeFactory().constructFromCanonical(). This allows attackers to instruct the underlying ObjectMapper to deserialize attacker-controlled input into arbitrary classes. The vulnerability is rated as Critical with a CVSS score of 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) (GitHub Advisory).
The vulnerability enables attackers to escape the jinjava sandbox and instantiate a wide range of classes using JavaType. This capability can be used to read arbitrary files and perform full read Server-Side Request Forgery (SSRF) by creating network-related objects. In certain environments, depending on the available classes, this primitive can lead to complete remote code execution (GitHub Advisory).
The vulnerability has been fixed in jinjava version 2.8.1. Users should upgrade to this version to prevent exploitation. The fix includes additional restrictions on property accessing to disallow fetching properties from restricted bases (GitHub Release).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."