Skip to content
Fencer Vulns
critical 9.8

CVE-2025-59340 json

jinjava Sandbox Bypass via JavaType-Based Deserialization

published 2025-09-17 13 mo ago modified 2026-07-31 3 mo ago also EUVD-2025-29780 , GHSA-m49c-g9wr-hv6v

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
2.2%
EPSS 2.2% chance of exploitation in 30 days, percentile 82%
public exploits
0
none known

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.

Patch / fix

  • maven com.hubspot.jinjava:jinjava 2.7.5, 2.8.1
  • com.hubspot.jinjava jinjava 2.8.1
  • hubspot jinjava 2.8.1

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
total
Assessed
13 mo ago

Exploit prediction

2.19% chance of exploitation in the next 30 days, higher than 82% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 10.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven com.hubspot.jinjava:jinjava
>=2.8.0, <2.8.1
>=2.7.0, <2.7.5
2.8.1
2.7.5

Affected products

  • HubSpot jinjava

Classification

Weakness
  • CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.