CVE-2022-22976: Integer Overflow
A flaw was found in Spring Framework. The encoder does not perform any salt rounds when using the BCrypt class with the maximum work factor (31) due to an integer overflow error.
Other sources
Spring Security could provide weaker than expected security, caused by an integer overflow vulnerability which results in a lack of salt rounds when using the BCrypt class with the maximum work factor. A local authenticated attacker could exploit this vulnerability to launch further attacks on the system.
— IBM
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.
Only in circumstances where the BCryptPasswordEncoder has been configured with the maximum work factor are affected. Due to current limitations in computer hardware, the use of such a high work factor is computationally impractical.
https://tanzu.vmware.com/security/cve-2022-22976
— Red Hat
Affected Software
Remediation
Patch Available
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2022-22976?
CVE-2022-22976 is a vulnerability found in Spring Framework that allows an attacker to bypass salt rounds during encoding.
What versions of Spring Security are affected by CVE-2022-22976?
Spring Security versions 5.5.x prior to 5.5.7, 5.6.x prior to 5.6.4, and earlier unsupported versions are affected.
How severe is CVE-2022-22976?
CVE-2022-22976 has a severity rating of 5.3, which is considered medium.
What is the official reference for CVE-2022-22976?
The official references for CVE-2022-22976 are: https://tanzu.vmware.com/security/cve-2022-22976, https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2087921, and https://access.redhat.com/errata/RHSA-2022:5532.
How can I fix CVE-2022-22976?
To fix CVE-2022-22976, upgrade to Spring Security versions 5.5.7, 5.6.4, or 5.7.0 which contain the necessary patches.