CVE-2025-59340
Hubspot Jinjava vulnerability
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.
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
Affected products
Jinjava. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Hubspot Jinjava runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v · Vendor Advisory
- github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1 · Patch
- github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1
- nvd.nist.gov/vuln/detail/CVE-2025-59340
- github.com/HubSpot/jinjava/releases/tag/jinjava-2.7.5
- github.com/advisories/GHSA-m49c-g9wr-hv6v
- github.com/github/advisory-database/pull/8141
- nvd.nist.gov/vuln/detail/CVE-2025-59340
- cve.org/CVERecord?id=CVE-2025-59340
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.