Cyber Resilience

CVE-2025-59340

Hubspot Jinjava ≤ 2.8.1

Published
17 September 2025
Modified
26 September 2025
Patch / advisory
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.023 82th percentile
Risk Priority 75 floored blend · peak EPSS

Summary

CVE-2025-59340 is a critical-severity Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336) vulnerability in Hubspot Jinjava. Its CVSS base score is 9.8 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Template Injection (T1221); ranked in the top 18% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

jinjava is a Java-based template engine that renders Jinja-style templates and is affected by CVE-2025-59340 prior to version 2.8.1. The flaw stems from unsafe use of mapper.getTypeFactory().constructFromCanonical() on attacker-controlled input, which allows the underlying ObjectMapper to deserialize data into arbitrary classes without invoking restricted methods or literals. This breaks the intended sandbox and permits instantiation of classes such as java.net.URL, enabling direct access to local files and URLs.

An unauthenticated remote attacker who can supply template input can leverage the primitive to read arbitrary files and, through further chaining, achieve remote code execution. The vulnerability carries a CVSS 3.1 score of 9.8 reflecting network attack vector, low complexity, and full impact on confidentiality, integrity, and availability.

The project addressed the issue in release 2.8.1; the corresponding commit and GitHub Security Advisory GHSA-m49c-g9wr-hv6v document the fix. The associated EPSS score has remained flat at 0.0127 with no observed rise after disclosure.

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1221 Template Injection Stealth
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-25526Same product: Hubspot Jinjava
CVE-2025-64087Shared CWE-1336
CVE-2026-44916Shared CWE-1336
CVE-2025-49136Shared CWE-1336
CVE-2025-32461Shared CWE-1336
CVE-2024-8238Shared CWE-1336
CVE-2025-57811Shared CWE-1336
CVE-2025-12107Shared CWE-1336
CVE-2026-42252Shared CWE-1336
CVE-2025-14700Shared CWE-1336

Affected Assets

hubspot
jinjava
≤ 2.8.1

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.2
  • V1.3.7
  • V1.3.10

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and static analysis can discover missing neutralization of template directives.

Input validation rejects or sanitizes untrusted data before it reaches the template engine, stopping injection of special syntax.

Security engineering principles require use of safe templating APIs and proper escaping of external input.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require proper input neutralization in template engines to prevent injection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect template-injection flaws but does not itself implement neutralization controls.

prevents

Secure development life cycle mandates input validation and sanitization that directly prevents template-injection weaknesses.

prevents

Application security requirements explicitly call for neutralizing special elements in template engines.

prevents

Secure architecture principles reduce the likelihood of unsafe template processing but do not prescribe specific neutralization techniques.

prevents

Secure coding standards require proper escaping or sandboxing of template directives, directly mitigating CWE-1336.

References