# CVE-2025-59340: jinjava Sandbox Bypass via JavaType-Based Deserialization

> CVE-2025-59340: jinjava Sandbox Bypass via JavaType-Based Deserialization. CVSS 9.8 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2025-59340
Last updated: 2026-06-17T09:45:56Z

- Published: 2025-09-17 20:01 UTC · Updated: 2026-06-17 09:45 UTC · Assigner: GitHub\_M
- CVSS: 9.8 (CVSS 3.1) · Severity: Critical · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 2.1%, 82th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-1336

## Description

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.

## Affected vendors and products

- HubSpot: jinjava

## Tracked companies

- [HubSpot](https://rewindex.com/company/hubspot.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2025-59340)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2025-59340)
- [https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1](https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1)
- [https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1](https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1)
- [https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v](https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2025-59340 · Markdown: https://rewindex.com/cve/CVE-2025-59340.md · JSON: https://rewindex.com/api/v1/cves/CVE-2025-59340 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T03:11:18.083Z
