{"cve":"CVE-2025-59340","nvd":{"published":"2025-09-17T20:15:36.430","modified":"2026-06-17T09:45:56.163","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10.0},"cwes":["CWE-1336"],"references":["https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1","https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1","https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v"],"products":["hubspot:jinjava"],"source":"nvd","synced_at":"2026-10-19T22:10:08.713834912+00:00"},"epss":{"cve":"CVE-2025-59340","score":0.02185,"percentile":0.82394,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-m49c-g9wr-hv6v","url":"https://osv.dev/vulnerability/GHSA-m49c-g9wr-hv6v","summary":"jinjava has Sandbox Bypass via JavaType-Based Deserialization","modified":"2026-07-31T22:30:23.044427296Z","packages":[{"ecosystem":"Maven","name":"com.hubspot.jinjava:jinjava","purl":"pkg:maven/com.hubspot.jinjava/jinjava","ranges":[">=2.8.0 <2.8.1"],"fixed":["2.8.1"]},{"ecosystem":"Maven","name":"com.hubspot.jinjava:jinjava","purl":"pkg:maven/com.hubspot.jinjava/jinjava","ranges":[">=2.7.0 <2.7.5"],"fixed":["2.7.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}