CVE-2022-22968: Spring Framework Improper Handling Of Case Sensitivity Vulnerability

HIGH
Advisory Identifier: GHSA-g5mm-vmx4-3rg7
CVSS 7.5
CWE-178
Published
Advisory Summary

CVE-2022-22968 is a HIGH (CVSS 7.5) improper handling of case sensitivity vulnerability (CWE-178: Improper Handling of Case Sensitivity) affecting Spring Framework libraries in the Maven ecosystem. The issue involves improper handling of case sensitivity in spring framework. Remediation is available by upgrading affected packages to version 5.3.19, 5.2.21.RELEASE.

CVE-2022-22968 at a Glance

CVE Identifier CVE-2022-22968
GHSA Identifier GHSA-g5mm-vmx4-3rg7
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-178: Improper Handling of Case Sensitivity
Affected Product Spring Framework
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:H/A:N).

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 High (I:H)
Availability None (A:N)

How to Fix CVE-2022-22968

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:spring-context fixed: 5.3.19
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>5.3.19</version>
</dependency>
org.springframework:spring-context fixed: 5.2.21.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>5.2.21.RELEASE</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

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.springframework

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 5.3.19), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework 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-178: Improper Handling of Case Sensitivity, where the product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results. 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 Framework versions 5.3.0 - 5.3.18, 5.2.0 - 5.2.20, and older unsupported versions, the patterns for disallowedFields on a DataBinder are case sensitive which means a field is not effectively protected unless it is listed with both upper and lower case for the first character of the field, including upper and lower case for the first character of all nested fields within the property path. Versions 5.3.19 and 5.2.21 contain a patch for this issue.

CVE-2022-22968 Affected Spring Framework Versions

2 component(s)
Fixed Versions:
5.3.195.2.21.RELEASE
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework:spring-context
Maven
≥ 5.3.0
< 5.3.19
5.3.19
org.springframework:spring-context
Maven
< 5.2.21.RELEASE
5.2.21.RELEASE

References

Frequently Asked Questions

What is CVE-2022-22968?
CVE-2022-22968 is a security vulnerability in Spring Framework involving Improper handling of case sensitivity in Spring Framework under CWE-178: Improper Handling of Case Sensitivity.
Which Spring Framework versions are affected?
Affected versions include releases prior to 5.3.19, 5.2.21.RELEASE across affected packages: org.springframework:spring-context.
What version fixes CVE-2022-22968?
Upgrading to 5.3.19, 5.2.21.RELEASE (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-context affected?
Yes, org.springframework:spring-context is affected in releases prior to 5.3.19, 5.2.21.RELEASE. Upgrade your dependency to 5.3.19, 5.2.21.RELEASE or later.
What is the CVSS score of CVE-2022-22968?
CVE-2022-22968 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:H/A:N.
What CWE is associated with CVE-2022-22968?
CVE-2022-22968 is classified under CWE-178: Improper Handling of Case Sensitivity (The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results.).
How can I check Maven dependencies for CVE-2022-22968?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework'. 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-g5mm-vmx4-3rg7",
  "modified" : "2024-05-15T06:24:20Z",
  "published" : "2022-04-15T00:00:32Z",
  "aliases" : [ "CVE-2022-22968" ],
  "summary" : "Improper handling of case sensitivity in Spring Framework",
  "details" : "In Spring Framework versions 5.3.0 - 5.3.18, 5.2.0 - 5.2.20, and older unsupported versions, the patterns for disallowedFields on a DataBinder are case sensitive which means a field is not effectively protected unless it is listed with both upper and lower case for the first character of the field, including upper and lower case for the first character of all nested fields within the property path. Versions 5.3.19 and 5.2.21 contain a patch for this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-context"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.19"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-context"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.21.RELEASE"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-22968"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/833e750175349ab4fd502109a8b41af77e25cdea"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/a7cf19cec5ebd270f97a194d749e2d5701ad2ab7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-framework"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20220602-0004"
  }, {
    "type" : "WEB",
    "url" : "https://tanzu.vmware.com/security/cve-2022-22968"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-178" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-04-22T20:45:32Z",
    "nvd_published_at" : "2022-04-14T21:15:00Z"
  }
}