jinjava Sandbox Bypass via JavaType-Based Deserialization
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-1336.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| HubSpot | jinjava | before 2.8.1 | 2.8.1 | Patch available | CNA |
| — | com.hubspot.jinjava:jinjava (Maven) | 2.8.0 to before 2.8.1 | 2.8.1 | Patch available | GHSA-m49c-g9wr-hv6v |
| — | com.hubspot.jinjava:jinjava (Maven) | 2.7.0 to before 2.7.5 | 2.7.5 | Patch available | GHSA-m49c-g9wr-hv6v |
- jinjava VendorHubSpot Affected before 2.8.1 Fixed in 2.8.1 Patch available CNA
- com.hubspot.jinjava:jinjava (Maven) Vendor— Affected 2.8.0 to before 2.8.1 Fixed in 2.8.1 Patch available GHSA-m49c-g9wr-hv6v
- com.hubspot.jinjava:jinjava (Maven) Vendor— Affected 2.7.0 to before 2.7.5 Fixed in 2.7.5 Patch available GHSA-m49c-g9wr-hv6v
Remediation
- Fix · CNA jinjava (HubSpot) Fixed in 2.8.1
- Fix · GHSA-m49c-g9wr-hv6v com.hubspot.jinjava:jinjava (Maven) Fixed in 2.8.1 Advisory →
- Fix · GHSA-m49c-g9wr-hv6v com.hubspot.jinjava:jinjava (Maven) Fixed in 2.7.5 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-59340
- 2026-10-03 Alias added: GHSA-m49c-g9wr-hv6v
References
Advisory 2
More HubSpot Jinjava vulnerabilities
- TI-2026-20635 JinJava Bypass through ForTag leads to Arbitrary Java Execution CVSS 3.1CRITICAL 9.8
- TI-2020-10073 Jinjava before 2.5.4 allow access to arbitrary classes by calling Java methods on objects… CVSS 3.1MEDIUM 6.5
- TI-2018-13389 Jinjava before 2.4.6 does not block the getClass method, related to… CVSS 3.0MEDIUM 5.3
Sources
- CVE-2025-59340 · CVE Program
- CVE-2025-59340 · NVD
- FIRST EPSS
- GHSA-m49c-g9wr-hv6v · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences