Spring Security BCryptPasswordEncoder maximum password length breaks timing attack mitigation

MEDIUM | APRIL 22, 2025 | CVE-2025-22234

Description

The fix applied in CVE-2025-22228 inadvertently broke the timing attack mitigation implemented in DaoAuthenticationProvider.

Affected Spring Products and Versions

Spring Security:

  • 6.4.4 - 6.4.4
  • 6.3.8 - 6.3.8
  • 6.2.10 - 6.2.10
  • 6.1.14 - 6.1.14
  • 6.0.16 - 6.0.16
  • 5.8.18 - 5.8.18
  • 5.7.16 and earlier

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
6.4.5OSS
6.3.9OSS
6.2.11Enterprise Support Only
6.1.15Enterprise Support Only
6.0.17Enterprise Support Only
5.8.19Enterprise Support Only
5.7.17Enterprise Support Only

No further mitigation steps are necessary.

Credit

The issue was identified and responsibly reported by Jonas Robl ([email protected]).

History

  • 2025-04-22: Initial vulnerability report published.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all