CVE-2024-41172: Cxf rt transports http Apache CXF Allows Unrestricted Memory Vulnerability

MODERATE
Advisory Identifier: GHSA-4mgg-fqfq-64hg
CVSS 3.7
CWE-401
Published
Advisory Summary

CVE-2024-41172 is a MODERATE (CVSS 3.7) apache cxf allows unrestricted memory vulnerability (CWE-401: Missing Release of Memory after Effective Lifetime) affecting Cxf rt transports http libraries in the Maven ecosystem. The issue involves apache cxf allows unrestricted memory consumption in cxf http clients. Remediation is available by upgrading affected packages to version 4.0.5, 3.6.4.

CVE-2024-41172 at a Glance

CVE Identifier CVE-2024-41172
GHSA Identifier GHSA-4mgg-fqfq-64hg
Severity MODERATE
CVSS v3.1 Base Score 3.7
CWE Classification CWE-401: Missing Release of Memory after Effective Lifetime
Affected Product Cxf rt transports http
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2024-41172

To remediate this vulnerability, upgrade all affected Cxf rt transports http 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:cxf-rt-transports-http fixed: 4.0.5
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>4.0.5</version>
</dependency>
org.apache.cxf:cxf-rt-transports-http fixed: 3.6.4
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>3.6.4</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-2024-41172, 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 Cxf rt transports http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.5), 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-401: Missing Release of Memory after Effective Lifetime, where the product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse. In Cxf rt transports http, 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

In versions of Apache CXF before 3.6.4 and 4.0.5 (3.5.x and lower versions are not impacted), a CXF HTTP client conduit may prevent HTTPClient instances from being garbage collected and it is possible that memory consumption will continue to increase, eventually causing the application to run out of memory

CVE-2024-41172 Affected Cxf rt transports http Versions

2 component(s)
Fixed Versions:
4.0.53.6.4
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.cxf:cxf-rt-transports-http
Maven
≥ 4.0.0
< 4.0.5
4.0.5
org.apache.cxf:cxf-rt-transports-http
Maven
≥ 3.6.0
< 3.6.4
3.6.4

References

Frequently Asked Questions

What is CVE-2024-41172?
CVE-2024-41172 is a security vulnerability in Cxf rt transports http involving Apache CXF allows unrestricted memory consumption in CXF HTTP clients under CWE-401: Missing Release of Memory after Effective Lifetime.
Which Cxf rt transports http versions are affected?
Affected versions include releases prior to 4.0.5, 3.6.4 across affected packages: org.apache.cxf:cxf-rt-transports-http.
What version fixes CVE-2024-41172?
Upgrading to 4.0.5, 3.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cxf-rt-transports-http affected?
Yes, org.apache.cxf:cxf-rt-transports-http is affected in releases prior to 4.0.5, 3.6.4. Upgrade your dependency to 4.0.5, 3.6.4 or later.
What is the CVSS score of CVE-2024-41172?
CVE-2024-41172 has a CVSS v3.1 base score of 3.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2024-41172?
CVE-2024-41172 is classified under CWE-401: Missing Release of Memory after Effective Lifetime (The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.).
How can I check Maven dependencies for CVE-2024-41172?
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-4mgg-fqfq-64hg",
  "modified" : "2024-11-18T16:26:53Z",
  "published" : "2024-07-19T09:32:06Z",
  "aliases" : [ "CVE-2024-41172" ],
  "summary" : "Apache CXF allows unrestricted memory consumption in CXF HTTP clients",
  "details" : "In versions of Apache CXF before 3.6.4 and 4.0.5 (3.5.x and lower versions are not impacted), a CXF HTTP client conduit may prevent HTTPClient instances from being garbage collected and it is possible that memory consumption will continue to increase, eventually causing the application to run  out of memory\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cxf:cxf-rt-transports-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cxf:cxf-rt-transports-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.6.0"
      }, {
        "fixed" : "3.6.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41172"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/cxf"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/n2hvbrgwpdtcqdccod8by28ynnolybl6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-401" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-19T18:34:56Z",
    "nvd_published_at" : "2024-07-19T09:15:05Z"
  }
}