CVE-2021-30468: Apache cxf Infinite Loop Vulnerability
HIGHCVE-2021-30468 is a HIGH (CVSS 7.5) infinite loop vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Apache cxf libraries in the Maven ecosystem. The issue involves infinite loop in apache cfx. Remediation is available by upgrading affected packages to version 3.4.4, 3.3.11.
CVE-2021-30468 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-30468
To remediate this vulnerability, upgrade all affected Apache cxf 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.cxf</groupId>
<artifactId>apache-cxf</artifactId>
<version>3.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>apache-cxf</artifactId>
<version>3.3.11</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf</artifactId>
<version>3.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf</artifactId>
<version>3.3.11</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.cxf
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-30468, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.cxf
Analyze the terminal output to locate any version of Apache cxf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.4.4), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.cxf 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Apache cxf, 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-30468 Affected Apache cxf Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.cxf:apache-cxf
|
Maven |
≥ 3.4.0
< 3.4.4
|
3.4.4
|
|
org.apache.cxf:apache-cxf
|
Maven |
< 3.3.11
|
3.3.11
|
|
org.apache.cxf:cxf
|
Maven |
≥ 3.4.0
< 3.4.4
|
3.4.4
|
|
org.apache.cxf:cxf
|
Maven |
< 3.3.11
|
3.3.11
|
References
Frequently Asked Questions
What is CVE-2021-30468?
Which Apache cxf versions are affected?
What version fixes CVE-2021-30468?
Is apache-cxf affected?
Is cxf affected?
What is the CVSS score of CVE-2021-30468?
What CWE is associated with CVE-2021-30468?
How can I check Maven dependencies for CVE-2021-30468?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g23v-p5jq-jvh4",
"modified" : "2021-06-24T13:23:03Z",
"published" : "2022-01-06T18:37:14Z",
"aliases" : [ "CVE-2021-30468" ],
"summary" : "Infinite loop in Apache CFX",
"details" : "A vulnerability in the JsonMapObjectReaderWriter of Apache CXF allows an attacker to submit malformed JSON to a web service, which results in the thread getting stuck in an infinite loop, consuming CPU indefinitely. This issue affects Apache CXF versions prior to 3.4.4; Apache CXF versions prior to 3.3.11.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:apache-cxf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.4.0"
}, {
"fixed" : "3.4.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:apache-cxf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:cxf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.4.0"
}, {
"fixed" : "3.4.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:cxf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.11"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-30468"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r3f46ae38e4a6e80c069cdb320e0ce831b0a21a12ef0cc92c0943f34a@%3Ccommits.tomee.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r4771084730c4cf6e59eda60b4407122c86f174eb750b24f610ba9ff4@%3Ccommits.tomee.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r4a4b6bc0520b69c18d2a59daa6af84ae49f0c22164dccb8538794459@%3Cannounce.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r4a4b6bc0520b69c18d2a59daa6af84ae49f0c22164dccb8538794459@%3Cdev.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r4a4b6bc0520b69c18d2a59daa6af84ae49f0c22164dccb8538794459@%3Cusers.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r54c0f1cbbb9f381dfbedb9ea5e90ecb1c0a15371f40c4b10322ac737@%3Ccommits.tomee.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/ra833f78b3fa577cb43558cf343859a1bf70b1c5ce2353b3877d96422@%3Ccommits.tomee.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rac07822057521dccf33ab5d136e0e8c599a6e2c8ac75e44ffbdc6e07@%3Ccommits.tomee.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/re5b2a2b77faa22684d47bd2ac6623135c615565328ff40a1ec705448@%3Ccommits.tomee.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/re9e05c6cab5f0dcc827eba4e6fcf26fa0b493e7ca84d62c867a80d03@%3Ccommits.tomee.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20210917-0002"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
}, {
"type" : "WEB",
"url" : "http://cxf.apache.org/security-advisories.data/CVE-2021-30468.txt.asc"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2021/06/16/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-06-17T18:54:46Z",
"nvd_published_at" : "2021-06-16T12:15:00Z"
}
}