CVE-2021-44521: Cassandra all Apache Cassandra Vulnerable To Code Vulnerability
CRITICALCVE-2021-44521 is a CRITICAL (CVSS 9.1) apache cassandra vulnerable to code vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Cassandra all libraries in the Maven ecosystem. The issue involves apache cassandra vulnerable to code injection due to unsafe configuration. Remediation is available by upgrading affected packages to version 3.0.26, 3.11.12, 4.0.2.
CVE-2021-44521 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2021-44521
To remediate this vulnerability, upgrade all affected Cassandra all dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>3.0.26</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>3.11.12</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>4.0.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.cassandra
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-44521, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.cassandra
Analyze the terminal output to locate any version of Cassandra all in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.26), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.cassandra command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. In Cassandra all, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-44521 Affected Cassandra all Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.cassandra:cassandra-all
|
Maven |
< 3.0.26
|
3.0.26
|
|
org.apache.cassandra:cassandra-all
|
Maven |
≥ 3.11.0
< 3.11.12
|
3.11.12
|
|
org.apache.cassandra:cassandra-all
|
Maven |
≥ 4.0.0
< 4.0.2
|
4.0.2
|
References
Frequently Asked Questions
What is CVE-2021-44521?
Which Cassandra all versions are affected?
What version fixes CVE-2021-44521?
Is cassandra-all affected?
What is the CVSS score of CVE-2021-44521?
What CWE is associated with CVE-2021-44521?
How can I check Maven dependencies for CVE-2021-44521?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8ffc-79xg-29w8",
"modified" : "2022-08-11T19:20:55Z",
"published" : "2022-02-12T00:00:48Z",
"aliases" : [ "CVE-2021-44521" ],
"summary" : "Apache Cassandra vulnerable to Code Injection due to unsafe configuration",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cassandra:cassandra-all"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.26"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cassandra:cassandra-all"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.11.0"
}, {
"fixed" : "3.11.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cassandra:cassandra-all"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-44521"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/cassandra"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/CASSANDRA-17352"
}, {
"type" : "WEB",
"url" : "https://jfrog.com/blog/cve-2021-44521-exploiting-apache-cassandra-user-defined-functions-for-remote-code-execution"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/y4nb9s4co34j8hdfmrshyl09lokm7356"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20220225-0001"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2022/02/11/4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-732", "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-02-23T16:10:04Z",
"nvd_published_at" : "2022-02-11T13:15:00Z"
}
}