WaratekVRT Sign in

CVE-2025-59340 jinjava

Affected softwarejinjava
Severity10.0 Critical CVSS 3.1 2 scores
Fixed in2.8.1, 2.7.5
WeaknessCWE-1336
Published17 Sep 2025
Updated17 Jun 2026

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.

Exploitation status

No public exploit

No exploit has been reported in the sources we check. Published a year ago.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment exploitation: none
  • Indexed PoC none indexed
  • EPSS 2.2% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR deserialization security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's description identifies a deserialization vulnerability. Matched by description (CWE-1336 was assigned, but does not settle the class on its own).
Candidate fix https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1 : a commit: the change itself

How to mitigate CVE-2025-59340

Upgrade jinjava to a release that fixes it: 2.8.1 or 2.7.5. Until you can, Waratek RASP blocks exploitation with its deserialization and process rules. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

CVSS

10.0 CRITICAL v3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 10.0 CRITICAL CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H NVD Primary published
CVSS 3.1 9.8 CRITICAL CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H security-advisories@github.com Secondary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
com.hubspot.jinjava:jinjava 2.8.0 2.8.1 unbounded
com.hubspot.jinjava:jinjava 2.7.0 2.7.5 unbounded

Products and versions

2 products, 3 version entries
SourceVendorProductSchemeAffected versions
osv com.hubspot.jinjava jinjava generic ≥ 2.7.0 and < 2.7.5 · ≥ 2.8.0 and < 2.8.1
nvd hubspot jinjava generic < 2.8.1

References

URLTags
https://github.com/HubSpot/jinjava/commit/66df351e7e8ad71ca04dcacb4b65782af820b8b1 commit
https://github.com/HubSpot/jinjava/security/advisories/GHSA-m49c-g9wr-hv6v WEB
https://github.com/github/advisory-database/pull/8141 WEB
https://github.com/HubSpot/jinjava PACKAGE
https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.7.5 WEB
https://github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.1 WEB

Timeline

Published2025-09-17By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.