Improper handling of case sensitivity in Spring Framework
Published 15 Apr 2022 · Updated 15 May 2024
Is your project on an affected org.springframework:spring-context?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=5.3.0 <5.3.19
- Fixed in
- 5.3.19
mvn versions:use-dep-version -Dincludes=org.springframework:spring-context -DdepVersion=5.3.19 -DforceVersion=true- Affected
- <5.2.21.RELEASE
- Fixed in
- 5.2.21.RELEASE
mvn versions:use-dep-version -Dincludes=org.springframework:spring-context -DdepVersion=5.2.21.RELEASE -DforceVersion=trueDetails
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.
Is GHSA-g5mm-vmx4-3rg7 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.springframework:spring-context, and gives you the command that fixes it.
More advisories for org.springframework:spring-context
- LowCVE-2025-22233Spring Framework DataBinder Case Sensitive Match Exception · 16 May 2025
- MediumCVE-2024-38820Spring Framework DataBinder Case Sensitive Match Exception · 18 Oct 2024
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2022-22968
- Linkgithub.com/spring-projects/spring-framework/commit/833e750175349ab4fd502109a8b41af77e25cdea
- Linkgithub.com/spring-projects/spring-framework/commit/a7cf19cec5ebd270f97a194d749e2d5701ad2ab7
- Packagegithub.com/spring-projects/spring-framework
- Linksecurity.netapp.com/advisory/ntap-20220602-0004
- Linktanzu.vmware.com/security/cve-2022-22968
- Linkwww.oracle.com/security-alerts/cpujul2022.html
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.