CVE-2022-24881: ballcat-codegen template engine remote code execution injection

com.hccake:ballcat-codegen Updated 02 Oct 2025

Summary

27/04/2022
Yes i
High
8.8

CVE-2022-24881: ballcat-codegen template engine remote code execution injection. Affects com.hccake:ballcat-codegen versions < 1.0.0.beta.2. Fixed in 1.0.0.beta.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Ballcat Codegen is a package that provides the functionality of online code editing to generate templates. It is commonly used in Maven projects. The package allows users to edit code and generate templates using Velocity and Freemarker template engines. However, in versions prior to 1.0.0.beta.2, the package lacks input verification, which can lead to remote code execution through malicious code injection in the template engine.

Vulnerability Detail

The vulnerability (CVE-2022-24881) in ballcat-codegen allows attackers to execute remote code by injecting malicious code into the template engine. This can be exploited due to the lack of input validation in versions prior to 1.0.0.beta.2. Attackers can craft malicious code that gets executed when the template engine processes the input. The impact of this vulnerability can be severe, as it allows unauthorized execution of arbitrary code on the affected system.

How To Fix

Minimum fixed version

1.0.0.beta.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the latest version of the ballcat-codegen package to mitigate the risk of remote code execution.

Conclusion

The ballcat-codegen package is vulnerable to remote code execution through template engine injection. To mitigate this vulnerability, it is crucial to upgrade to the latest version of the package (1.0.0.beta.2 or higher). For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for com.hccake:ballcat-codegen →

Share this vulnerability

FAQ

Ballcat Codegen is a package that provides online code editing functionality to generate templates in Maven projects.

The vulnerability allows attackers to execute remote code by injecting malicious code into the template engine, potentially leading to unauthorized execution of arbitrary code on the affected system.

Versions prior to 1.0.0.beta.2 are affected by this vulnerability.

No, there is no known workaround. It is crucial to upgrade to the latest version of the package to mitigate the risk.

To fix this vulnerability, upgrade the ballcat-codegen package to version 1.0.0.beta.2 or higher.

How To Fix

Minimum fixed version

1.0.0.beta.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback