{"answers":{"affected":"4 open source packages ship an affected version, including com.hubspot.jinjava:jinjava. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-59340 in the wild and no public exploit code.","fix":"Upgrade com.hubspot.jinjava:jinjava to a fixed version for your release line: 2.7.5 or 2.8.1.","what":"CVE-2025-59340 is a critical unsafe deserialization vulnerability in HubSpot jinjava, published on 17 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-59340 and fix it if it is affected.\n\nWhat it is: CVE-2025-59340 is a critical unsafe deserialization vulnerability in HubSpot jinjava, published on 17 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-59340 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- com.hubspot.jinjava:jinjava (Maven): affected from 2.7.0; fixed in 2.7.5\n- com.hubspot.jinjava:jinjava (Maven): affected from 2.7.0; fixed in 2.7.5\n- com.hubspot.jinjava:jinjava (Maven): affected from 2.8.0; fixed in 2.8.1\n- com.hubspot.jinjava:jinjava (Maven): affected from 2.8.0; fixed in 2.8.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-59340/ (Markdown: https://insights.sbomify.com/CVE-2025-59340/index.md)","id":"CVE-2025-59340","markdown":"https://insights.sbomify.com/CVE-2025-59340/index.md","name":"CVE-2025-59340","record":{"aliases":["CLEANSTART-2026-ZM98216","GHSA-m49c-g9wr-hv6v","MINI-9v5w-fr43-g2jm"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Java template engine","requires_auth":"none","summary":"Attackers can bypass the sandbox in the jinjava template engine to instantiate arbitrary classes, potentially leading to remote code execution or local file access.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"jinjava","vendor":"hubspot"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"jinjava Sandbox Bypass via JavaType-Based Deserialization","id":"CVE-2025-59340","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"deserialization","year":"2025"},"n_packages":4,"n_references":3,"next":{"headline":"Local File Inclusion in esm.sh","id":"CVE-2025-59341"},"packages":[{"ecosystem":"Maven","fixed":["2.7.5"],"introduced":["2.7.0"],"last_affected":[],"package":"com.hubspot.jinjava:jinjava","purl":null,"source":"GHSA-m49c-g9wr-hv6v"},{"ecosystem":"Maven","fixed":["2.7.5"],"introduced":["2.7.0"],"last_affected":[],"package":"com.hubspot.jinjava:jinjava","purl":"pkg:maven/com.hubspot.jinjava/jinjava","source":"GHSA-m49c-g9wr-hv6v"},{"ecosystem":"Maven","fixed":["2.8.1"],"introduced":["2.8.0"],"last_affected":[],"package":"com.hubspot.jinjava:jinjava","purl":null,"source":"GHSA-m49c-g9wr-hv6v"},{"ecosystem":"Maven","fixed":["2.8.1"],"introduced":["2.8.0"],"last_affected":[],"package":"com.hubspot.jinjava:jinjava","purl":"pkg:maven/com.hubspot.jinjava/jinjava","source":"GHSA-m49c-g9wr-hv6v"}],"prev":{"headline":"The Bastion ttyrec files are not signed after encryption by the osh-encrypt-rsync script","id":"CVE-2025-59339"},"products":["jinjava"],"published":"2025-09-17","related":[{"cvss_score":9.8,"headline":"JinJava Bypass through ForTag leads to Arbitrary Java Execution","id":"CVE-2026-25526","kev_date_added":null,"published":"2026-02-04"},{"cvss_score":6.5,"headline":"Unauthorized access to Class instance in Jinjava","id":"CVE-2020-12668","kev_date_added":null,"published":"2021-02-19"},{"cvss_score":5.3,"headline":"Jinjava calls getClass","id":"CVE-2018-18893","kev_date_added":null,"published":"2019-01-03"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-09-18","vendors":["HubSpot"]},"summary":"Attackers can bypass the sandbox in the jinjava template engine to instantiate arbitrary classes, potentially leading to remote code execution or local file access.","url":"https://insights.sbomify.com/CVE-2025-59340/"}