
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-50631 is a Time-of-Check Time-of-Use (TOCTOU) race condition vulnerability in Apache CXF's OAuth2 implementation, specifically in the AbstractOAuthDataProvider class. It allows concurrent requests using the same Refresh Token to bypass single-use semantics and generate multiple valid Access Tokens when the recycleRefreshTokens configuration option is set to false. Affected versions include Apache CXF (org.apache.cxf:cxf-rt-rs-security-oauth2) before 4.1.7 and 4.2.0 before 4.2.2. The vulnerability was disclosed on June 11, 2026, and carries a CVSS v3.1 base score of 7.4 (High) (Apache Advisory, GitHub Advisory).
The root cause is a TOCTOU race condition (CWE-367) in the AbstractOAuthDataProvider class within Apache CXF's OAuth2 module (cxf-rt-rs-security-oauth2). When recycleRefreshTokens is set to false, the provider checks the validity of a refresh token and then uses it to issue a new access token, but the state of the token is not atomically updated between the check and the use. This window allows multiple concurrent HTTP requests bearing the same leaked refresh token to all pass the validity check before any single one of them invalidates the token, resulting in multiple valid access tokens being issued. The vulnerability was reported by Guanping Zhang and requires an attacker to have obtained a valid refresh token through other means (e.g., token leakage) before exploitation (oss-security, GitHub Advisory).
Successful exploitation allows an unauthenticated attacker (who possesses a leaked refresh token) to bypass single-use token semantics and generate multiple valid access tokens simultaneously, gaining unauthorized access to protected resources. The confidentiality and integrity impacts are rated High, as an attacker could read sensitive data and perform unauthorized actions on behalf of the token's legitimate owner. Availability is not directly impacted. If the compromised account has broad permissions, this could facilitate lateral movement within the protected application ecosystem (GitHub Advisory, oss-security).
recycleRefreshTokens set to false (the non-default or explicitly configured state that enables the race condition)./oauth2/token) with grant_type=refresh_token and the stolen refresh_token value.curl with parallel execution, or asyncio-based HTTP clients) to exploit the TOCTOU window before the server can invalidate the token./oauth2/token or equivalent) from the same or different source IPs, all carrying the same refresh_token value within a very short time window.Users should upgrade to Apache CXF version 4.2.2 (for the 4.2.x branch) or 4.1.7 (for the 4.1.x branch), which contain the fix for this race condition (Apache Advisory, oss-security). As a temporary workaround, set recycleRefreshTokens to true to enforce single-use refresh token semantics, which eliminates the exploitable race condition window. Additionally, implement monitoring for concurrent refresh token usage and revoke any tokens exhibiting signs of replay activity.
The vulnerability was disclosed via the Apache security mailing list and oss-security on June 11, 2026, by Colm O hEigeartaigh on behalf of the Apache CXF team, crediting Guanping Zhang as the finder (oss-security). The Apache project rated the severity as "low" in their own advisory, while NVD assigned a CVSS score of 7.4 (High), reflecting a discrepancy in severity assessment. A brief mention appeared on Bluesky via the infosec.skyfleet.blue account shortly after disclosure, and the vulnerability was indexed by standard security aggregators (VulDB, Vulners, cvefeed.io) without significant broader community discussion.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."