CVE-2020-12668
Java vulnerability analysis and mitigation

Overview

Jinjava before version 2.5.4 contained a security vulnerability (CVE-2020-12668) that allowed access to arbitrary classes by calling Java methods on objects passed into a Jinjava context. The vulnerability was discovered in April 2020 and fixed in version 2.5.4 released in May 2020. The issue affected all versions of Jinjava prior to 2.5.4 (GitHub Security Lab).

Technical details

The vulnerability existed because Jinjava did not properly restrict access to Class instances. While it prevented direct access to Class properties and methods returning Class instances, it failed to prevent Array or Map accesses that returned Class instances. Additionally, the internal Jinjava interpreter was exposed through a secret 'int3rpr3t3r' variable. This allowed access to template context variables, filters, functions, and tags. Through these functions, attackers could access java.lang.reflect.Method instances and subsequently obtain Class instances (GitHub Security Lab).

Impact

The vulnerability could allow for abuse of the application class loader, leading to arbitrary file disclosure. An attacker with privileges to write Jinjava templates, such as in a CMS context, could read arbitrary files from the file system. Additionally, the vulnerability could potentially be exploited for Server-Side Request Forgery (SSRF) attacks by using different protocols like http, https, or ftp to establish network connections (GitHub Security Lab).

Exploitability

The vulnerability required an attacker to have privileges to write Jinjava templates. Once this access was obtained, the attacker could exploit the vulnerability through a series of steps including accessing the interpreter, obtaining Class instances, and leveraging ClassLoader access to read arbitrary files (GitHub Security Lab).

Mitigation and workarounds

The vulnerability was fixed in Jinjava version 2.5.4. The fix included adding Method and JinjavaInterpreter to the blacklist and implementing additional security measures to prevent unauthorized access to system resources. Users should upgrade to version 2.5.4 or later to mitigate this vulnerability (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-53837CRITICAL9.9
  • Java logoJava
  • org.xwiki.rendering:xwiki-rendering-xml
NoYesSep 18, 2026
CVE-2026-77615HIGH8.7
  • JavaScript logoJavaScript
  • paella-core
NoYesSep 17, 2026
CVE-2026-54148HIGH8.1
  • Java logoJava
  • org.http4k:http4k-security-digest
NoYesSep 18, 2026
CVE-2026-85058HIGH7.5
  • Java logoJava
  • io.moquette:moquette-broker
NoYesSep 18, 2026
CVE-2026-54147MEDIUM6.5
  • Java logoJava
  • org.http4k:http4k-security-digest
NoYesSep 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management