CVE-2026-50630: Apache CXF CRLF injection in OAuth2 AuthorizationUtils

CVE-2026-50630 · Severity: medium · CVSS 6.5 · Published 2026-06-12

Apache CXF is a widely-used Java framework for building web services and REST APIs. The OAuth2 security module has a flaw in how it constructs HTTP response headers: it fails to sanitize user-controlled input in the 'realm' parameter, allowing an attacker to inject line breaks and create malformed responses. An attacker exploiting this could inject fake HTTP headers, redirect users to malicious sites, or split the response to deceive clients—potentially leading to session hijacking or credential theft.

Technologies: org.apache.cxf:cxf-rt-rs-security-oauth2 (Maven). Vendors: Maven.

Quick answers

Is CVE-2026-50630 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-50630 being exploited in the wild.
How severe is CVE-2026-50630?
Medium severity, with a CVSS score of 6.5, published 12 June 2026.
Which products and versions are affected?
org.apache.cxf:cxf-rt-rs-security-oauth2 (Maven) ECOSYSTEM:introduced=4.2.0,fixed=4.2.2.
Is there a fix for CVE-2026-50630?
Yes. org.apache.cxf:cxf-rt-rs-security-oauth2 (Maven): upgrade to 4.2.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-50630 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-50630?
Check whether you run org.apache.cxf:cxf-rt-rs-security-oauth2 (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • org.apache.cxf:cxf-rt-rs-security-oauth2 (Maven): upgrade to 4.2.2 or later
    # set org.apache.cxf:cxf-rt-rs-security-oauth2 to 4.2.2 in your pom.xml or build.gradle

Technical details

The vulnerability is a CRLF injection (CWE-113) in the OAuth2 AuthorizationUtils class within Apache CXF's security module. The root cause is the lack of input sanitization when constructing the WWW-Authenticate HTTP response header: the 'realm' parameter is concatenated directly without removing or escaping CR (\r) and LF (\n) characters. An attacker who can control the realm value (e.g., via a malicious OAuth2 authorization request) can inject these characters to add arbitrary HTTP headers or completely split the HTTP response. The attack requires network access to an OAuth2-protected endpoint and no authentication or user interaction. Successful exploitation allows an attacker to manipulate response headers, potentially leading to cache poisoning, session hijacking, credential theft, or phishing. Fixed in versions 4.2.2 and 4.1.7.

Affected products

  • Apache CXF org.apache.cxf:cxf-rt-rs-security-oauth2 >= 4.2.0, < 4.2.2; < 4.1.7

Identifiers

  • CVE-2026-50630
  • GHSA-xf62-wr5p-5p95

Timeline

  • 2026-06-11: disclosed: Vulnerability disclosed on oss-security mailing list
  • 2026-06-12: advisory: Published to GitHub Advisory Database and NVD
  • 2026-06-12: patched: Fixes available in CXF 4.2.2 and 4.1.7

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.