CVE-2026-22751

Authorization Bypass
Affects
Spring Security
in
Spring
No items found.
Versions
6.4.x; 6.5.x; 7.0.x
Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Vulnerability in Spring Security. Applications that explicitly configure One-Time Token login with JdbcOneTimeTokenService are vulnerable to a Time-of-check Time-of-use (TOCTOU) race condition.

Details

Module Info

Vulnerability Info

Vulnerability in Spring Security. Applications that explicitly configure One-Time Token login with JdbcOneTimeTokenService are vulnerable to a Time-of-check Time-of-use (TOCTOU) race condition.

Mitigation

Only recent versions of Spring Framework receive community support and updates. Older versions have no publicly available fixes for this vulnerability.Users of the affected components should apply one of the following mitigations:

  • Upgrade to a currently supported version of Spring Framework.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support through Never-Ending Support (NES) for Spring Framework.
  • Review and modify the configuration of JdbcOneTimeTokenService to ensure it does not rely on One-Time Token login, if feasible.
  • Implement additional logging and monitoring around token generation and validation processes to detect any anomalies or potential exploitation attempts.
  • Enforce strict access controls to the database used by JdbcOneTimeTokenService, limiting access to only necessary services and users.

Steps To Reproduce

1. Set up the affected environment: Deploy an application using a vulnerable Spring Security version. Ensure that the application is configured to use _JdbcOneTimeTokenService for One-Time Token login.

2. Configure the One-Time Token login: In your application, explicitly configure the One-Time Token login mechanism using _JdbcOneTimeTokenService_. Ensure that the database is properly set up to store the tokens.

3. Trigger the vulnerability: Simulate a race condition by initiating two simultaneous login requests using the same One-Time Token. This can be done by sending two requests to the login endpoint with the same token from different clients or threads.

4. Observe the application behavior: Monitor the application's response to the simultaneous login attempts. If the application allows both requests to succeed, it confirms the presence of the TOCTOU race condition vulnerability.

5. Remediate the vulnerability: Update the Spring Security library to a fixed version

6. Verify the remediation: After the update, repeat the simultaneous login attempts with the same One-Time Token. Confirm that the application now rejects one of the requests, ensuring that the vulnerability has been effectively mitigated.

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-22751
PROJECT Affected
Spring Security
Versions Affected
6.4.x; 6.5.x; 7.0.x
NES Versions Affected
6.4.x
Published date
April 21, 2026
≈ Fix date
April 21, 2026
Category
Authorization Bypass
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Spring
Rss feed icon
Subscribe via RSS
or

By clicking “submit” I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.