Vulnerabilities in pkg:maven/org.apache.cxf/cxf-rt-rs-security-oauth2
PACKAGECVE-2026-50631 is a HIGH (CVSS 7.4) apache cxf oauth2 toctou race vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Cxf rt rs security oauth2 libraries in the Maven ecosystem. The issue involves apache cxf oauth2 toctou race condition in refresh token processing. Remediation is available by upgrading affected packages to version 4.2.2, 4.1.7.
pkg:maven/org.apache.cxf/cxf-rt-rs-security-oauth2
Vulnerability advisories affecting package pkg:maven/org.apache.cxf/cxf-rt-rs-security-oauth2. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-83r6-96m8-r52p | CVE-2026-50631 | HIGH | Apache CXF OAuth2 TOCTOU Race Condition in Refresh Token Processing |
| GHSA-xf62-wr5p-5p95 | CVE-2026-50630 | MODERATE | Apache CXF OAuth2 HTTP Response Splitting via WWW-Authenticate Realm Injection |
| GHSA-9mrv-8pvf-hf4m | CVE-2026-50627 | CRITICAL | Apache CXF OAuth2 Missing JWT Audience and Issuer Validation in Access Token Validator |
| GHSA-g5v7-jchf-7jrr | CVE-2026-50628 | CRITICAL | Apache CXF OAuth2 has Inverted IP Binding Check that Defeats Security Control |
| GHSA-f8p7-h97q-7vx7 | CVE-2026-50629 | HIGH | Apache CXF OAuth2 Log Injection via Unsanitized Client Identifier |
| GHSA-542g-m3fx-q86f | CVE-2026-50623 | MODERATE | Apache CXF has Authentication Bypass in OAuth2 TokenIntrospectionService |
CVE-2026-50631 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-50631
To remediate this vulnerability, upgrade all affected Cxf rt rs security oauth2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-oauth2</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-oauth2</artifactId>
<version>4.1.7</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.cxf
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-50631, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.cxf
Analyze the terminal output to locate any version of Cxf rt rs security oauth2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.cxf command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Cxf rt rs security oauth2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-50631 Affected Cxf rt rs security oauth2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.cxf:cxf-rt-rs-security-oauth2
|
Maven |
≥ 4.2.0
< 4.2.2
|
4.2.2
|
|
org.apache.cxf:cxf-rt-rs-security-oauth2
|
Maven |
< 4.1.7
|
4.1.7
|
References
Frequently Asked Questions
What is CVE-2026-50631?
Which Cxf rt rs security oauth2 versions are affected?
What version fixes CVE-2026-50631?
Is cxf-rt-rs-security-oauth2 affected?
What is the CVSS score of CVE-2026-50631?
What CWE is associated with CVE-2026-50631?
How can I check Maven dependencies for CVE-2026-50631?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-83r6-96m8-r52p",
"modified" : "2026-08-20T18:32:34Z",
"published" : "2026-06-12T12:31:33Z",
"aliases" : [ "CVE-2026-50631" ],
"summary" : "Apache CXF OAuth2 TOCTOU Race Condition in Refresh Token Processing",
"details" : "A race condition in AbstractOAuthDataProvider allows concurrent requests using the same Refresh Token to bypass single-use semantics and generate multiple valid Access Tokens, when 'recycleRefreshTokens' is set to false. A leaked refresh token can be replayed concurrently by multiple attackers or threads. Users are recommended to upgrade to versions 4.2.2 or 4.1.7, which fixes this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:cxf-rt-rs-security-oauth2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2.0"
}, {
"fixed" : "4.2.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:cxf-rt-rs-security-oauth2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.1.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-50631"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/cxf"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/s83t3x4r626o9h8rt0ryr1w7w53l1vv8"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2026/06/11/8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-20T18:32:34Z",
"nvd_published_at" : "2026-06-12T10:16:23Z"
}
}