CVE-2022-24881
Java vulnerability analysis and mitigation

Overview

Ballcat Codegen, prior to version 1.0.0.beta.2, contained a remote code execution vulnerability (CVE-2022-24881) in its online code generation template functionality. The vulnerability was discovered and disclosed on April 25, 2022, affecting the template engine components that utilize both Velocity and Freemarker templates (GitHub Advisory).

Technical details

The vulnerability stems from insufficient input validation in both Velocity and Freemarker template implementations. The CVSS v3.1 score for this vulnerability is 8.8 (HIGH), while the CVSS v2.0 score is 9.0 (HIGH). The vulnerability is classified under CWE-94 (Code Injection) and CWE-20 (Improper Input Validation) (NVD).

Impact

When exploited, this vulnerability allows attackers to execute arbitrary code remotely through malicious template injection. Attackers can craft specially formatted templates using either Velocity or Freemarker syntax to achieve remote code execution on the affected system (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in version 1.0.0.beta.2 with commit 84a7cb3, which implemented security policies for both template engines. The fix includes using TemplateClassResolver.SAFER_RESOLVER for Freemarker and SecureUberspector for Velocity engine. Users are strongly advised to upgrade to version 1.0.0.beta.2 or later (GitHub Commit).

Community reactions

The vulnerability has been observed being targeted in attacks against financial services organizations, highlighting its significance in real-world attack scenarios (Akamai Report).

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-55749HIGH8.7
  • JavaJava
  • org.xwiki.platform:xwiki-platform-tool-jetty-resources
NoYesDec 01, 2025
CVE-2025-13806MEDIUM6.9
  • JavaJava
  • org.nutz:nutzboot-parent
NoNoDec 01, 2025
CVE-2025-13805MEDIUM6.3
  • JavaJava
  • org.nutz:nutzboot-parent
NoNoDec 01, 2025
CVE-2025-13804MEDIUM5.3
  • JavaJava
  • org.nutz:nutzboot-parent
NoNoDec 01, 2025
CVE-2025-66372LOW2.8
  • JavaJava
  • org.mustangproject:library
NoYesNov 28, 2025

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