CVE-2024-22236: Spring Framework Spring Cloud Contract Vulnerable To Vulnerability

LOW
Advisory Identifier: GHSA-p6rp-mx85-m459
CVSS 3.3
CWE-732 CWE-377
Published
Advisory Summary

CVE-2024-22236 is a LOW (CVSS 3.3) spring cloud contract vulnerable to vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring cloud contract vulnerable to local information disclosure. Remediation is available by upgrading affected packages to version 4.1.1, 4.0.5, 3.1.10.

CVE-2024-22236 at a Glance

CVE Identifier CVE-2024-22236
GHSA Identifier GHSA-p6rp-mx85-m459
Severity LOW
CVSS v3.1 Base Score 3.3
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 3.3

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

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

How to Fix CVE-2024-22236

To remediate this vulnerability, upgrade all affected Spring Framework 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.springframework.cloud:spring-cloud-contract-shade fixed: 4.1.1
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-contract-shade</artifactId>
    <version>4.1.1</version>
</dependency>
org.springframework.cloud:spring-cloud-contract-shade fixed: 4.0.5
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-contract-shade</artifactId>
    <version>4.0.5</version>
</dependency>
org.springframework.cloud:spring-cloud-contract-shade fixed: 3.1.10
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-contract-shade</artifactId>
    <version>3.1.10</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.springframework.cloud

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-22236, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.springframework.cloud

Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework.cloud 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 Spring Framework, 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 Spring Cloud Contract, versions 4.1.x prior to 4.1.1, versions 4.0.x prior to 4.0.5, and versions 3.1.x prior to 3.1.10, test execution is vulnerable to local information disclosure via temporary directory created with unsafe permissions through the shaded com.google.guava:guava dependency in the org.springframework.cloud:spring-cloud-contract-shade dependency.

CVE-2024-22236 Affected Spring Framework Versions

3 component(s)
Fixed Versions:
4.1.14.0.53.1.10
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.cloud:spring-cloud-contract-shade
Maven
≥ 4.1.0
< 4.1.1
All 1 versions
4.1.0
4.1.1
org.springframework.cloud:spring-cloud-contract-shade
Maven
≥ 4.0.0
< 4.0.5
4.0.5
org.springframework.cloud:spring-cloud-contract-shade
Maven
≥ 3.1.0
< 3.1.10
3.1.10

References

Frequently Asked Questions

What is CVE-2024-22236?
CVE-2024-22236 is a security vulnerability in Spring Framework involving Spring Cloud Contract vulnerable to local information disclosure under CWE-732: Incorrect Permission Assignment for Critical Resource.
Which Spring Framework versions are affected?
Affected versions include releases prior to 4.1.1, 4.0.5, 3.1.10 across affected packages: org.springframework.cloud:spring-cloud-contract-shade.
What version fixes CVE-2024-22236?
Upgrading to 4.1.1, 4.0.5, 3.1.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-cloud-contract-shade affected?
Yes, org.springframework.cloud:spring-cloud-contract-shade is affected in releases prior to 4.1.1, 4.0.5, 3.1.10. Upgrade your dependency to 4.1.1, 4.0.5, 3.1.10 or later.
What is the CVSS score of CVE-2024-22236?
CVE-2024-22236 has a CVSS v3.1 base score of 3.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-22236?
CVE-2024-22236 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check Maven dependencies for CVE-2024-22236?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.cloud'. 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-p6rp-mx85-m459",
  "modified" : "2025-06-04T21:10:01Z",
  "published" : "2024-01-31T09:30:18Z",
  "aliases" : [ "CVE-2024-22236" ],
  "summary" : "Spring Cloud Contract vulnerable to local information disclosure",
  "details" : "In Spring Cloud Contract, versions 4.1.x prior to 4.1.1, versions 4.0.x prior to 4.0.5, and versions 3.1.x prior to 3.1.10, test execution is vulnerable to local information disclosure via temporary directory created with unsafe permissions through the shaded com.google.guava:guava dependency in the org.springframework.cloud:spring-cloud-contract-shade dependency.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-contract-shade"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.1"
      } ]
    } ],
    "versions" : [ "4.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-contract-shade"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.cloud:spring-cloud-contract-shade"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22236"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-cloud/spring-cloud-contract"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2024-22236"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-377", "CWE-732" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-31T18:07:41Z",
    "nvd_published_at" : "2024-01-31T07:15:07Z"
  }
}