CVE-2021-30468: Apache cxf Infinite Loop Vulnerability

HIGH
Advisory Identifier: GHSA-g23v-p5jq-jvh4
CVSS 7.5
CWE-400 CWE-835
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-30468
GHSA Identifier GHSA-g23v-p5jq-jvh4
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Apache cxf
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (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.

org.apache.cxf:apache-cxf fixed: 3.4.4
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>apache-cxf</artifactId>
    <version>3.4.4</version>
</dependency>
org.apache.cxf:apache-cxf fixed: 3.3.11
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>apache-cxf</artifactId>
    <version>3.3.11</version>
</dependency>
org.apache.cxf:cxf fixed: 3.4.4
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf</artifactId>
    <version>3.4.4</version>
</dependency>
org.apache.cxf:cxf fixed: 3.3.11
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf</artifactId>
    <version>3.3.11</version>
</dependency>
Verify Direct and Transitive Dependencies

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

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.

CVE-2021-30468 Affected Apache cxf Versions

4 component(s)
Fixed Versions:
3.4.43.3.11
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

NVD — CVE-2021-30468 NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-30468
lists.apache.org/thread.html/r3f46ae... WEB
https://lists.apache.org/thread.html/r3f46ae38e4a6e80c069cdb320e0ce831b0a21a12ef0cc92c0943f34a@%3Ccommits.tomee.apache.org%3E
lists.apache.org/thread.html/r477108... WEB
https://lists.apache.org/thread.html/r4771084730c4cf6e59eda60b4407122c86f174eb750b24f610ba9ff4@%3Ccommits.tomee.apache.org%3E
lists.apache.org/thread.html/r4a4b6b... WEB
https://lists.apache.org/thread.html/r4a4b6bc0520b69c18d2a59daa6af84ae49f0c22164dccb8538794459@%3Cannounce.apache.org%3E
lists.apache.org/thread.html/r4a4b6b... WEB
https://lists.apache.org/thread.html/r4a4b6bc0520b69c18d2a59daa6af84ae49f0c22164dccb8538794459@%3Cdev.cxf.apache.org%3E
lists.apache.org/thread.html/r4a4b6b... WEB
https://lists.apache.org/thread.html/r4a4b6bc0520b69c18d2a59daa6af84ae49f0c22164dccb8538794459@%3Cusers.cxf.apache.org%3E
lists.apache.org/thread.html/r54c0f1... WEB
https://lists.apache.org/thread.html/r54c0f1cbbb9f381dfbedb9ea5e90ecb1c0a15371f40c4b10322ac737@%3Ccommits.tomee.apache.org%3E
lists.apache.org/thread.html/ra833f7... WEB
https://lists.apache.org/thread.html/ra833f78b3fa577cb43558cf343859a1bf70b1c5ce2353b3877d96422@%3Ccommits.tomee.apache.org%3E
lists.apache.org/thread.html/rac0782... WEB
https://lists.apache.org/thread.html/rac07822057521dccf33ab5d136e0e8c599a6e2c8ac75e44ffbdc6e07@%3Ccommits.tomee.apache.org%3E
lists.apache.org/thread.html/re5b2a2... WEB
https://lists.apache.org/thread.html/re5b2a2b77faa22684d47bd2ac6623135c615565328ff40a1ec705448@%3Ccommits.tomee.apache.org%3E
lists.apache.org/thread.html/re9e05c... WEB
https://lists.apache.org/thread.html/re9e05c6cab5f0dcc827eba4e6fcf26fa0b493e7ca84d62c867a80d03@%3Ccommits.tomee.apache.org%3E
Apache cxf Security Information SECURITY
https://security.netapp.com/advisory/ntap-20210917-0002
Apache cxf Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2022.html
Apache cxf Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2021.html
Apache cxf Security Information SECURITY
http://cxf.apache.org/security-advisories.data/CVE-2021-30468.txt.asc
Apache cxf Security Information SECURITY
http://www.openwall.com/lists/oss-security/2021/06/16/2

Frequently Asked Questions

What is CVE-2021-30468?
CVE-2021-30468 is a security vulnerability in Apache cxf involving Infinite loop in Apache CFX under CWE-400: Uncontrolled Resource Consumption.
Which Apache cxf versions are affected?
Affected versions include releases prior to 3.4.4, 3.3.11 across affected packages: org.apache.cxf:apache-cxf, org.apache.cxf:cxf.
What version fixes CVE-2021-30468?
Upgrading to 3.4.4, 3.3.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-cxf affected?
Yes, org.apache.cxf:apache-cxf is affected in releases prior to 3.4.4, 3.3.11. Upgrade your dependency to 3.4.4, 3.3.11 or later.
Is cxf affected?
Yes, org.apache.cxf:cxf is affected in releases prior to 3.4.4, 3.3.11. Upgrade your dependency to 3.4.4, 3.3.11 or later.
What is the CVSS score of CVE-2021-30468?
CVE-2021-30468 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-30468?
CVE-2021-30468 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for CVE-2021-30468?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.cxf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}