Remote code execution via unsafe template evaluation
Published Apr 26, 2022 · Updated Apr 22, 2025
Code injection in BallCat Codegen before 1.0.0.beta.2 allows remote authenticated users to execute OS commands through crafted templates. The Velocity and FreeMarker renderers evaluate user-controlled template content without restricting class resolution or reflective access to Java runtime facilities. Access to template management and code preview is required; successful rendering runs attacker-selected commands with the server process's privileges.
Summary
What happened
Code injection in BallCat Codegen before 1.0.0.beta.2 allows remote authenticated users to execute OS commands through crafted templates. The Velocity and FreeMarker renderers evaluate user-controlled template content without restricting class resolution or reflective access to Java runtime facilities. Access to template management and code preview is required; successful rendering runs attacker-selected commands with the server process's privileges.
The record
- CVE
- CVE-2022-24881
- Published
- Apr 26, 2022
- Updated
- Apr 22, 2025
- Vendor
- BallCat Projects
- Product
- BallCat Codegen
- Classifications
- CWE-78, CWE-94, CWE-20, T1059
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Apr 26, 2022CVE publishedPublication date reported by the CVE source.
- Apr 22, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 1.0.0.beta.2
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- GHSA Velocity and FreeMarker template-injection proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo