{"id":"CVE-2021-44521","published":"2022-02-11T12:20:12Z","modified":"2024-08-04T04:25:16Z","title":"Remote code execution for scripted UDFs","vendor":"Apache Software Foundation","product":"Apache Cassandra","tier":"core","eol":null,"affectedVersions":[{"vendor":"Apache Software Foundation","product":"Apache Cassandra","versions":[">= 3.0.0, < unspecified",">= unspecified, < 3.0.26",">= 3.1, < unspecified",">= unspecified, < 3.11.12",">= 4.0.0, < unspecified",">= unspecified, < 4.0.2"]}],"workarounds":{"items":["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"],"from":"CVE.org CNA","provenance":"source"},"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"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.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T03:45:37Z"},"cvss":null,"epss":{"score":0.58896,"percentile":0.99132,"date":"2026-11-20","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":3,"pulses":[{"name":"Vulnerabilities in Apache Products","url":"https://otx.alienvault.com/pulse/622f34890b534565792b6be6","created":"2022-03-14"},{"name":"AQCTUALIZACION | Datastax Enterprise with IBM is vulnerable to exploiting Apache Cassandra User-Defined Functions for Remote Code Execution","url":"https://otx.alienvault.com/pulse/6217822a96829b893f0a40d9","created":"2022-02-24"},{"name":"A High-severity Vulnerability Leading to RCE Addressed in Apache Cassandra","url":"https://otx.alienvault.com/pulse/620dd8b421678d92233a64ba","created":"2022-02-17"}],"provenance":"machine"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://lists.apache.org/thread/y4nb9s4co34j8hdfmrshyl09lokm7356","tags":["x_refsource_MISC"]},{"url":"http://www.openwall.com/lists/oss-security/2022/02/11/4","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://jfrog.com/blog/cve-2021-44521-exploiting-apache-cassandra-user-defined-functions-for-remote-code-execution/","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20220225-0001/","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Maven","package":"org.apache.cassandra:cassandra-all","vulnerableRanges":["<3.0.26",">=3.11.0, <3.11.12",">=4.0.0, <4.0.2"],"patched":["3.0.26","3.11.12","4.0.2"],"from":["GHSA-8ffc-79xg-29w8"],"provenance":"source"}],"advisories":[{"id":"GHSA-8ffc-79xg-29w8","url":"https://github.com/advisories/GHSA-8ffc-79xg-29w8","severity":"CRITICAL","ecosystem":"Maven","package":"org.apache.cassandra:cassandra-all","vulnerableRanges":["<3.0.26"],"patched":["3.0.26"],"provenance":"source","from":"GHSA"},{"id":"GHSA-8ffc-79xg-29w8","url":"https://github.com/advisories/GHSA-8ffc-79xg-29w8","severity":"CRITICAL","ecosystem":"Maven","package":"org.apache.cassandra:cassandra-all","vulnerableRanges":[">=3.11.0, <3.11.12"],"patched":["3.11.12"],"provenance":"source","from":"GHSA"},{"id":"GHSA-8ffc-79xg-29w8","url":"https://github.com/advisories/GHSA-8ffc-79xg-29w8","severity":"CRITICAL","ecosystem":"Maven","package":"org.apache.cassandra:cassandra-all","vulnerableRanges":[">=4.0.0, <4.0.2"],"patched":["4.0.2"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2022-0915","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-0915","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2022-02-24","earliestUrl":"https://github.com/WoodenKlaas/CVE-2021-44521","repos":[{"name":"WoodenKlaas/CVE-2021-44521","url":"https://github.com/WoodenKlaas/CVE-2021-44521","stars":10,"created":"2022-02-24"},{"name":"Yeyvo/poc-CVE-2021-44521","url":"https://github.com/Yeyvo/poc-CVE-2021-44521","stars":1,"created":"2022-12-03"}]},"nuclei":[{"id":"CVE-2021-44521","name":"Apache Cassandra Load UDF RCE","severity":"critical","path":"network/cves/2021/CVE-2021-44521.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/network/cves/2021/CVE-2021-44521.yaml"}],"first":{"date":"2022-02-24","source":"PoC-in-GitHub","url":"https://github.com/WoodenKlaas/CVE-2021-44521"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2022-02-11","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2021-44521","provenance":"source"},{"date":"2022-02-24","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/WoodenKlaas/CVE-2021-44521","provenance":"source"}],"speed":{"daysToPublicExploit":13,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":26.2,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.83,"detail":"percentile 0.9913"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"2 PoC-in-GitHub repos; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":1.37,"detail":"3 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"packageHistory":[{"cve":"CVE-2018-8016","published":"2018-06-28","fixed":"3.11.2","kev":false},{"cve":"CVE-2020-17516","published":"2021-02-03","fixed":"3.11.10","kev":false,"link":{"from":"CVE-2020-17516","to":"CVE-2021-44521","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.apache.cassandra:cassandra-all","fromFixed":"3.0.24","toFixed":"3.0.26","daysApart":373}]}},{"cve":"CVE-2020-13946","published":"2020-09-01","fixed":"4.0-beta2","kev":false},{"cve":"CVE-2021-44521","published":"2022-02-11","fixed":"4.0.2","kev":false},{"cve":"CVE-2025-26467","published":"2025-08-25","fixed":"4.0.17","kev":false},{"cve":"CVE-2026-27315","published":"2026-04-07","fixed":"4.0.20","kev":false},{"cve":"CVE-2023-30601","published":"2023-05-30","fixed":"4.1.2","kev":false,"link":{"from":"CVE-2021-44521","to":"CVE-2023-30601","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.apache.cassandra:cassandra-all","fromFixed":"4.0.2","toFixed":"4.0.10","daysApart":473}]}}],"package":"Maven:org.apache.cassandra:cassandra-all"}}