{"id":"CVE-2025-59340","state":"PUBLISHED","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 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.","publishedAt":"2025-09-17T20:01:55.788Z","updatedAt":"2025-09-18T15:45:23.121Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["HubSpot jinjava"],"affected":[{"vendor":"HubSpot","product":"jinjava","versions":[{"version":"< 2.8.1","status":"affected"}]}],"references":["https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v","https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1","https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1"],"weaknesses":["CWE-1336"],"ingestedAt":"2026-10-29T20:09:39.787Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/59xxx/CVE-2025-59340.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2025-59340","state":"PUBLISHED","datePublished":"2025-09-17T20:01:55.788Z","dateUpdated":"2025-09-18T15:45:23.121Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2025-09-12T12:36:24.635Z"},"containers":{"cna":{"title":"jinjava Sandbox Bypass via JavaType-Based Deserialization","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"HubSpot","product":"jinjava","versions":[{"version":"< 2.8.1","status":"affected"}]}],"references":[{"url":"https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v","name":"https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1","name":"https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1","tags":["x_refsource_MISC"]},{"url":"https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1","name":"https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1336","lang":"en","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2025-09-17T20:01:55.788Z"},"source":{"advisory":"GHSA-m49c-g9wr-hv6v","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-09-18T15:45:18.654916Z","id":"CVE-2025-59340","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-09-18T15:45:23.121Z"}}]}}}