Patchfirst
CVE-2021-44521 Public exploit EPSS 58.9%

Remote code execution for scripted UDFs

Fix:upgrade cassandra-all to 4.0.2 or later Details ↓

Apache Software Foundation · Apache Cassandra

Summary

Apache Cassandra contains a code injection flaw in its scripted user-defined function support, which can be triggered when the configuration enables both user-defined functions and scripted user-defined functions while disabling the user-defined functions threads option. An attacker who holds sufficient permissions to create user-defined functions in the cluster can execute arbitrary code on the host under that configuration, which the project documents as unsafe.

Official description · CVE.org

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.

Breakdown
26.2 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Public exploit code (PoC-in-GitHub) appeared 13 days after disclosure. No confirmed exploitation is recorded.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+13 days

7 fixes in cassandra-all over 8 years. The latest fix listed for cassandra-all is 4.1.2.

Fixes in cassandra-allMaven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 3.11.2CVE-2018-801628 Jun 2018
  2. 3.11.10CVE-2020-175163 Feb 2021
  3. 4.0-beta2CVE-2020-139461 Sep 2020
  4. 4.0.2CVE-2021-4452111 Feb 2022
  5. 4.0.17CVE-2025-2646725 Aug 2025
  6. 4.0.20CVE-2026-273157 Apr 2026
  7. 4.1.2CVE-2023-3060130 May 2023Latest listed

Affected versions and fixes

as published in the CVE record

Apache Software Foundation Apache Cassandra

Affected: >= 3.0.0, < unspecified · >= unspecified, < 3.0.26 · >= 3.1, < unspecified · >= unspecified, < 3.11.12 · >= 4.0.0, < unspecified · >= unspecified, < 4.0.2

Workaround

Set `enable_user_defined_functions_threads: true` (this is default) or 3.0 users should upgrade to 3.0.26 3.11 users should upgrade to 3.11.12 4.0 users should upgrade to 4.0.2

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: org.apache.cassandra:cassandra-all.

Mavenorg.apache.cassandra:cassandra-allGHSA-8ffc-79xg-29w8

Upgrade to 4.0.2 or later

Set the version to 4.0.2 or later in your pom.xml or build.gradle.

The first fix for CVE-2021-44521. No other CVE tracked by Patchfirst affects this package.

Affected versions, by release line

If you runUpgrade to
4.0.0 up to 4.0.24.0.2
3.11.0 up to 3.11.123.11.12
All versions before 3.0.263.0.26

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 3 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

4 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close