Vulnerability · Published Sep 17, 2025 · Assigned by GitHub_M

CVE-2025-59340jinjava Sandbox Bypass via JavaType-Based Deserialization

Critical 9.8

In plain English

A critical-severity security flaw in jinjava from HubSpot. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.2% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)2.2%top 17.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Mavencom.hubspot.jinjava:jinjava2.8.1GHSA-m49c-g9wr-hv6v
Mavencom.hubspot.jinjava:jinjava2.7.5GHSA-m49c-g9wr-hv6v

Affected products (as reported)

VendorProductVersions
HubSpot jinjava < 2.8.1

Weakness: CWE-1336 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References