Integer overflow in BCrypt class in Spring Security
Spring Security versions 5.5.x prior to 5.5.7, 5.6.x prior to 5.6.4, and earlier unsupported versions contain an integer overflow vulnerability. When using the BCrypt class with the maximum work factor (31), the encoder does not perform any salt rounds, due to an integer overflow error. The default settings are not affected by this CVE.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.springframework.security:spring-security-core | >= 5.2.0.RELEASE, < 5.5.7, >= 5.6.0, < 5.6.4 | 5.5.7, 5.6.4 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-22976
- https://github.com/spring-projects/spring-security/commit/388a7b62b906bd56deadb7ca45248fa1a63bdf12
- https://github.com/spring-projects/spring-security/commit/a40f73521c0dd88b879ff6165d280e78bdf8154f
- https://github.com/spring-projects/spring-security
- https://security.netapp.com/advisory/ntap-20220707-0003
- https://tanzu.vmware.com/security/cve-2022-22976
- https://www.oracle.com/security-alerts/cpujul2022.html
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N- Weakness (CWE)
CWE-190- Platform
- Java / Kotlin (Maven)
- Package
org.springframework.security:spring-security-core- Disclosed
- 20.05.2022
- Updated
- 11.10.2026 12:21
Sources and licenses
OSV / GitHub Advisory Database - GHSA-wx54-3278-m5g4 - CC BY 4.0
Vulnerability history: org.springframework.security:spring-security-core
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 31
- First → latest
- 10.2018 04.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 4
- High 11
- Medium 15
- Low 1
Disclosures per year
- 2018: 3
- 2019: 2
- 2020: 4
- 2021: 1
- 2022: 10
- 2023: 1
- 2024: 4
- 2025: 3
- 2026: 3
-
Integer overflow in BCrypt class in Spring Security this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.