CVE-2025-59340
CRITICAL 10.0CVSS 3.1jinjava has 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.
- Published
- 17 Sep 2025
- Last modified
- 31 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-1336
- Also known as
- GHSA-m49c-g9wr-hv6v
- Sources
- NVDJSONOSV GHSA-m49c-g9wr-hv6vJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | hubspot | jinjavacpe:2.3:a:hubspot:jinjava:*:*:*:*:*:*:*:* |
< 2.8.1 | 2.8.1 |
| OSV | Maven | com.hubspot.jinjava:jinjava | >= 2.8.0, < 2.8.1 | 2.8.1 |
| OSV | Maven | com.hubspot.jinjava:jinjava | >= 2.7.0, < 2.7.5 | 2.7.5 |
References
- https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1 · Patch, WEB
- https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1 · Release Notes, WEB
- https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v · Vendor Advisory, 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
History
- 25 Nov 2026 20:59 UTC · NVD: first stored (published 17 Sep 2025)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 17 Sep 2025)