This page lists Spring advisories.
CVE-2022-31691: Remote Code Execution via YAML editors in STS4 extensions for Eclipse and VSCode
CVE-2022-31690: Privilege Escalation in spring-security-oauth2-client
CVE-2022-31692: Authorization rules can be bypassed via forward or include dispatcher types in Spring Security
CVE-2022-31684: Reactor Netty HTTP Server may log request headers
CVE-2022-31679: Potential Unintended Data Exposure for Resource Exposed by Spring Data REST
CVE-2022-22980: Spring Data MongoDB SpEL Expression injection vulnerability through annotated repository query methods
CVE-2022-22979: Spring Cloud Function Dos Vulnerability
CVE-2022-22976: BCrypt skips salt rounds for work factor of 31
Description
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.
You need to be using BCrypt with a work factor of 31 to be impacted. You can check whether or not your passwords are impacted by using the following mitigation tool.
Affected Spring Products and Versions
- Spring Security
- 5.5.x prior to 5.5.7
- 5.6.x prior to 5.6.4
- Earlier unsupported versions
Mitigation
Prior to updating to the latest, please update your BCryptPasswordEncoder to use a lower number of rounds. At the time of this writing, OWASP recommends a value of 10.
Then, use the above-referenced mitigation tool to update your password hashes.
Once your password hashes are updated, you should update your version according to the following: 5.5.x users should upgrade to 5.5.7, 5.6.x users should upgrade to 5.6.4, or users should upgrade to 5.7.0. After upgrading your Spring Security dependency, you should advise affected users to change their password.
A mitigation FAQ can also be found in the mitigation tool.
Releases that have fixed this issue include:
- Spring Security
- 5.5.7
- 5.6.4
- 5.7.0
Credit
This issue was identified and responsibly reported by Eyal Kaspi.
References
CVE-2022-22978: Authorization Bypass in RegexRequestMatcher
Description
In Spring Security versions 5.4.10, 5.5.6, and 5.6.3 and older unsupported versions, RegexRequestMatcher can easily be misconfigured to be bypassed on some servlet containers.
Applications using RegexRequestMatcher with `.` in the regular expression are possibly vulnerable to an authorization bypass.
Affected Spring Products and Versions
- Spring Security
- 5.4.x prior to 5.4.11
- 5.5.x prior to 5.5.7
- 5.6.x prior to 5.6.4
- Earlier unsupported versions
Mitigation
Users should update to a version that includes fixes. 5.5.x users should upgrade to 5.5.7 or greater. 5.6.x users should upgrade to 5.6.4 or greater. Releases that have fixed this issue include:
- Spring Security
- 5.4.11+
- 5.5.7+
- 5.6.4+
- …
Reporting a vulnerability
To report a security vulnerability for a project within the Spring portfolio, see the Security Policy