CVE-2025-59340
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-17

Last updated on: 2025-09-26

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-17
Last Modified
2025-09-26
Generated
2026-05-07
AI Q&A
2025-09-17
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
hubspot jinjava to 2.8.1 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability in jinjava (prior to version 2.8.1) allows an attacker to use the method mapper.getTypeFactory().constructFromCanonical() to instruct the ObjectMapper to deserialize attacker-controlled input into arbitrary classes. This enables the attacker to create semi-arbitrary class instances without directly invoking restricted methods or class literals, effectively escaping the sandbox. For example, an attacker can instantiate classes like java.net.URL, which can be used to access local files or URLs. With further exploitation, this can potentially lead to remote code execution (RCE).


How can this vulnerability impact me? :

This vulnerability can have severe impacts including unauthorized access to local files and URLs, which can lead to information disclosure. Additionally, it can be chained to achieve remote code execution (RCE), allowing an attacker to execute arbitrary code on the affected system. This can compromise the confidentiality, integrity, and availability of the system.


What immediate steps should I take to mitigate this vulnerability?

Upgrade jinjava to version 2.8.1 or later, as this version contains the fix for the vulnerability that allows deserialization of attacker-controlled input leading to potential remote code execution.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart