CVE-2026-22751: Spring Security Core TOCTOU Race Condition in JdbcOneTimeTokenService
Summary
CVE-2026-22751: Vulnerability in Spring Spring Security. Affects org.springframework.security:spring-security-core across 3 version ranges.
>= 6.4.0, <= 6.4.13
>= 6.5.0, < 6.5.10
>= 7.0.3, < 7.0.5
Fixed in 6.5.10 or 7.0.5, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Spring Security Core is a widely used framework that provides authentication and authorization capabilities for Java applications. It is designed to secure applications by managing user authentication, access control, and session management. The framework is modular, allowing developers to integrate security features seamlessly into their applications. However, certain configurations, such as the One-Time Token login using JdbcOneTimeTokenService, can introduce vulnerabilities if not managed properly.
Vulnerability Detail
The vulnerability identified as CVE-2026-22751 is a Time-of-check Time-of-use (TOCTOU) race condition that occurs when applications configure One-Time Token login with JdbcOneTimeTokenService. This race condition can allow an attacker to exploit the timing of operations, potentially leading to unauthorized access. The issue affects specific versions of Spring Security, including versions from 6.4.0 to 6.4.15, 6.5.0 to 6.5.9, and 7.0.0 to 7.0.4. The ramifications of this vulnerability can be significant, as it may compromise the security of user accounts and sensitive data.
How To Fix
Latest published version: 7.2.0-RC1 as of 23 Oct 2026
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 6.5.0, < 6.5.106.5.10 -
>= 7.0.3, < 7.0.57.0.5
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, consider disabling the One-Time Token login feature if it is not essential for your application. This can help mitigate the risk until the package is updated to a secure version.
Conclusion
CVE-2026-22751 represents a significant vulnerability in the Spring Security Core framework, specifically affecting the One-Time Token login feature. It is crucial for developers to update to the patched versions to ensure the security of their applications. Utilizing tools like Vulert can aid in monitoring and identifying such vulnerabilities effectively.
See every vulnerability recorded for org.springframework.security:spring-security-core →
FAQ
A TOCTOU (Time-of-check Time-of-use) race condition occurs when a system checks a condition (like token validity) and then uses that condition in a way that can be exploited by an attacker before the action is completed.
The affected versions include Spring Security Core from 6.4.0 to 6.4.15, 6.5.0 to 6.5.9, and 7.0.0 to 7.0.4.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By simply analyzing your pom.xml file, you can check if your application is affected by this vulnerability.
The CVSS score for this vulnerability is 4.8, indicating a moderate severity level.
If immediate updates are not possible, consider disabling the One-Time Token login feature as a temporary workaround to reduce the risk of exploitation.
References
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework.security:spring-security-core.