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

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.15%, higher than 82% of CVEs (2026-12-01)
- Published: 2025-09-17T19:56:21.000Z
- Modified: 2026-07-31T22:30:23.044Z
- Also known as: GHSA-m49c-g9wr-hv6v
- Weaknesses: CWE-1336
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- HubSpot jinjava: < 2.8.1; before 2.8.1
- com.hubspot.jinjava:jinjava (Maven): from 2.8.0 before 2.8.1; from 2.7.0 before 2.7.5

## Every score

- GitHub_M: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v> (vendor-advisory, web)
- <https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1> (patch, web)
- <https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-59340> (advisory)
- <https://github.com/github/advisory-database/pull/8141> (web)
- <https://github.com/HubSpot/jinjava> (package)
- <https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.7.5> (web)

## Sources

- CVE List: [CVE-2025-59340](https://www.cve.org/CVERecord?id=CVE-2025-59340), CVE Terms of Use, modified 2025-09-18
- GitHub Advisory Database: [GHSA-m49c-g9wr-hv6v](https://github.com/advisories/GHSA-m49c-g9wr-hv6v), CC-BY-4.0, modified 2026-07-31
- NVD: [CVE-2025-59340](https://nvd.nist.gov/vuln/detail/CVE-2025-59340), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-59340 · Whole record: https://cve.day/CVE-2025-59340.json · Rebuilt by cve.day 2026-11-25T22:59:04.798Z
