Time-of-check Time-of-use (TOCTOU) Race Condition Affecting org.apache.cxf:cxf-rt-rs-security-oauth2 package, versions [,3.6.12)[4.0.0,4.1.8)[4.2.0,4.2.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.34% (28th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Time-of-check Time-of-use (TOCTOU) Race Condition vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGAPACHECXF-19342222
  • published27 Aug 2026
  • disclosed6 Aug 2026
  • creditGuanping Zhang

Introduced: 6 Aug 2026

NewCVE-2026-57818  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade org.apache.cxf:cxf-rt-rs-security-oauth2 to version 3.6.12, 4.1.8, 4.2.3 or higher.

Overview

org.apache.cxf:cxf-rt-rs-security-oauth2 is a services framework.

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition due to a race condition in the JCacheCodeDataProvider process. An attacker can obtain multiple valid access tokens by redeeming the same authorization code through concurrent requests.

CVSS Base Scores

version 4.0
version 3.1