CVE-2026-1035: Time-of-check Time-of-use (TOCTOU) Race Condition in Red Hat Red Hat Build of Keycloak
A flaw was found in the Keycloak server during refresh token processing, specifically in the TokenManager class responsible for enforcing refresh token reuse policies. When strict refresh token rotation is enabled, the validation and update of refresh token usage are not performed atomically. This allows concurrent refresh requests to bypass single-use enforcement and issue multiple access tokens from the same refresh token. As a result, Keycloak’s refresh token rotation hardening can be undermined.
AI Analysis
Technical Summary
CVE-2026-1035 identifies a time-of-check to time-of-use (TOCTOU) race condition vulnerability in the Red Hat Build of Keycloak, specifically within the TokenManager class responsible for enforcing refresh token reuse policies. When strict refresh token rotation is enabled—a security feature designed to prevent reuse of refresh tokens—the validation and update operations for refresh token usage are not performed atomically. This lack of atomicity means that if multiple refresh requests occur concurrently, they can bypass the single-use enforcement mechanism, allowing multiple access tokens to be issued from the same refresh token. This undermines the security guarantees of refresh token rotation, potentially allowing an attacker to reuse tokens beyond their intended single-use scope. The vulnerability requires network access and low privileges but does not require user interaction. The CVSS v3.1 base score is 3.1, reflecting low severity due to limited impact on confidentiality, integrity, and availability. There are no known exploits in the wild, and no patches or mitigations have been explicitly linked yet. The flaw primarily affects organizations using Red Hat's Keycloak build for identity and access management, especially those enforcing strict refresh token rotation policies.
Potential Impact
The primary impact of this vulnerability is the weakening of refresh token rotation security in Keycloak, potentially allowing an attacker to obtain multiple access tokens from a single refresh token. This could lead to extended unauthorized access if an attacker intercepts or obtains a refresh token, as the single-use enforcement designed to limit token reuse is bypassed. While the vulnerability does not directly compromise confidentiality or availability, it degrades the integrity of the token lifecycle management, increasing the risk of token replay attacks. Organizations relying on Keycloak for secure authentication and session management may face increased risk of unauthorized access persistence. The impact is mitigated by the requirement for network access and low privileges, and the absence of known exploits reduces immediate risk. However, in environments with high concurrency and strict token rotation policies, the vulnerability could be exploited to undermine session security.
Mitigation Recommendations
To mitigate this vulnerability, organizations should monitor Red Hat and Keycloak advisories closely and apply patches or updates as soon as they become available. In the interim, consider the following specific actions: 1) Limit concurrent refresh token requests from clients to reduce race condition windows; 2) Implement additional server-side synchronization or locking mechanisms around refresh token validation and update processes if customization is possible; 3) Review and tighten network access controls to restrict exposure of Keycloak endpoints to trusted clients only; 4) Enhance logging and monitoring to detect abnormal refresh token usage patterns indicative of replay attempts; 5) Educate developers and administrators on the risks of non-atomic token operations and encourage secure coding practices for token management; 6) Evaluate the necessity of strict refresh token rotation in your environment and consider alternative session management strategies if immediate patching is not feasible. These steps go beyond generic advice by focusing on concurrency control and operational monitoring specific to this race condition.
Affected Countries
United States, Germany, India, United Kingdom, France, Japan, Canada, Australia, Brazil, South Korea
CVE-2026-1035: Time-of-check Time-of-use (TOCTOU) Race Condition in Red Hat Red Hat Build of Keycloak
Description
A flaw was found in the Keycloak server during refresh token processing, specifically in the TokenManager class responsible for enforcing refresh token reuse policies. When strict refresh token rotation is enabled, the validation and update of refresh token usage are not performed atomically. This allows concurrent refresh requests to bypass single-use enforcement and issue multiple access tokens from the same refresh token. As a result, Keycloak’s refresh token rotation hardening can be undermined.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-1035 identifies a time-of-check to time-of-use (TOCTOU) race condition vulnerability in the Red Hat Build of Keycloak, specifically within the TokenManager class responsible for enforcing refresh token reuse policies. When strict refresh token rotation is enabled—a security feature designed to prevent reuse of refresh tokens—the validation and update operations for refresh token usage are not performed atomically. This lack of atomicity means that if multiple refresh requests occur concurrently, they can bypass the single-use enforcement mechanism, allowing multiple access tokens to be issued from the same refresh token. This undermines the security guarantees of refresh token rotation, potentially allowing an attacker to reuse tokens beyond their intended single-use scope. The vulnerability requires network access and low privileges but does not require user interaction. The CVSS v3.1 base score is 3.1, reflecting low severity due to limited impact on confidentiality, integrity, and availability. There are no known exploits in the wild, and no patches or mitigations have been explicitly linked yet. The flaw primarily affects organizations using Red Hat's Keycloak build for identity and access management, especially those enforcing strict refresh token rotation policies.
Potential Impact
The primary impact of this vulnerability is the weakening of refresh token rotation security in Keycloak, potentially allowing an attacker to obtain multiple access tokens from a single refresh token. This could lead to extended unauthorized access if an attacker intercepts or obtains a refresh token, as the single-use enforcement designed to limit token reuse is bypassed. While the vulnerability does not directly compromise confidentiality or availability, it degrades the integrity of the token lifecycle management, increasing the risk of token replay attacks. Organizations relying on Keycloak for secure authentication and session management may face increased risk of unauthorized access persistence. The impact is mitigated by the requirement for network access and low privileges, and the absence of known exploits reduces immediate risk. However, in environments with high concurrency and strict token rotation policies, the vulnerability could be exploited to undermine session security.
Mitigation Recommendations
To mitigate this vulnerability, organizations should monitor Red Hat and Keycloak advisories closely and apply patches or updates as soon as they become available. In the interim, consider the following specific actions: 1) Limit concurrent refresh token requests from clients to reduce race condition windows; 2) Implement additional server-side synchronization or locking mechanisms around refresh token validation and update processes if customization is possible; 3) Review and tighten network access controls to restrict exposure of Keycloak endpoints to trusted clients only; 4) Enhance logging and monitoring to detect abnormal refresh token usage patterns indicative of replay attempts; 5) Educate developers and administrators on the risks of non-atomic token operations and encourage secure coding practices for token management; 6) Evaluate the necessity of strict refresh token rotation in your environment and consider alternative session management strategies if immediate patching is not feasible. These steps go beyond generic advice by focusing on concurrency control and operational monitoring specific to this race condition.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- redhat
- Date Reserved
- 2026-01-16T07:03:59.680Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69706cf44623b1157caadc76
Added to database: 1/21/2026, 6:06:44 AM
Last enriched: 2/26/2026, 6:50:44 PM
Last updated: 3/24/2026, 7:52:55 PM
Views: 149
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.