This page lists Spring advisories.
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+
- …
CVE-2022-22970: Spring Framework DoS via Data Binding to MultipartFile or Servlet Part
Description
A Spring MVC or Spring WebFlux application that handles file uploads is vulnerable to DoS attack if it relies on data binding to set a MultipartFile or javax.servlet.Part to a field in a model object.
Affected Spring Products and Versions
- Spring Framework
- 5.3.0 to 5.3.19
- 5.2.0 to 5.2.21
- Older, unsupported versions are also affected
…
CVE-2022-22971: Spring Framework DoS with STOMP over WebSocket
Description
A Spring application with a STOMP over WebSocket endpoint is vulnerable to a denial of service attack by an authenticated user.
Affected Spring Products and Versions
- Spring Framework
- 5.3.0 to 5.3.19
- 5.2.0 to 5.2.21
- Older, unsupported versions are also affected
Mitigation
Users of affected versions should apply the following mitigation: 5.3.x users should upgrade to 5.3.20; 5.2.x users should upgrade to 5.2.22. No other steps are necessary. Releases that have fixed this issue include:
- Spring Framework
- 5.3.20
- …
CVE-2022-22969: Denial-of-Service (DoS) in spring-security-oauth2
CVE-2022-22968: Spring Framework Data Binding Rules Vulnerability
CVE-2022-22965: Spring Framework RCE via Data Binding on JDK 9+
Description
A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it.
These are the prerequisites for the exploit:
- JDK 9 or higher
- Apache Tomcat as the Servlet container
- Packaged as WAR
- spring-webmvc or spring-webflux dependency
Affected Spring Products and Versions
- Spring Framework
- 5.3.0 to 5.3.17
- 5.2.0 to 5.2.19
- Older, unsupported versions are also affected
Mitigation
Users of affected versions should apply the following mitigation: 5.3.x users should upgrade to 5.3.18+, 5.2.x users should upgrade to 5.2.20+. No other steps are necessary. There are other…
CVE-2022-22963: Remote code execution in Spring Cloud Function by malicious Spring Expression
CVE-2022-22950: Spring Expression DoS Vulnerability
Reporting a vulnerability
To report a security vulnerability for a project within the Spring portfolio, see the Security Policy