{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-59340","id":"CVE-2025-59340","title":"jinjava Sandbox Bypass via JavaType-Based Deserialization","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","descriptionLong":"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":"2025-09-17T20:01:55.788Z","updated":"2026-10-28T02:31:01.008272697Z","reserved":"2025-09-12T12:36:24.635Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"github.com"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["HubSpot jinjava"],"affectedProducts":[{"vendor":"HubSpot","product":"jinjava","defaultStatus":null,"versions":[{"version":"< 2.8.1","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Maven","name":"com.hubspot.jinjava:jinjava","purl":"pkg:maven/com.hubspot.jinjava/jinjava","ranges":[">=2.8.0 <2.8.1",">=2.7.0 <2.7.5"],"fixed":["2.8.1","2.7.5"],"advisory":"GHSA-m49c-g9wr-hv6v"}],"cwes":["CWE-1336"],"aliases":["GHSA-m49c-g9wr-hv6v"],"references":[{"url":"https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59340.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59340","tags":["advisory"]},{"url":"https://github.com/github/advisory-database/pull/8141","tags":["web"]},{"url":"https://github.com/HubSpot/jinjava","tags":["package"]},{"url":"https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.7.5","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.02148,"epssPercentile":0.82474,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-59340","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59340","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-59340","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-m49c-g9wr-hv6v","ok":true,"note":"GHSA-m49c-g9wr-hv6v"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-59340","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}