Skip to main content
CVE Vulnerability Database

CVE-2023-4639: Undertow Cookie Parsing Vulnerability

CVE-2023-4639 is an information disclosure flaw in Undertow that allows attackers to exfiltrate HttpOnly cookies through improper parsing. This article covers technical details, affected versions, impact, and mitigation.

Updated:

CVE-2023-4639 Overview

CVE-2023-4639 affects Undertow, the lightweight web server used in JBoss EAP and other Red Hat middleware products. The flaw stems from incorrect parsing of cookies that contain certain value-delimiting characters in incoming HTTP requests. An attacker can craft a cookie value that causes the server to misinterpret cookie boundaries. This behavior enables exfiltration of HttpOnly cookie values or injection of spoofed cookie values into the parsed request state. The vulnerability primarily impacts confidentiality and integrity of session data handled by Undertow-based applications.

Critical Impact

Attackers can leverage cookie parser confusion to disclose HttpOnly session cookies or spoof additional cookies, leading to unauthorized data access and request tampering against Undertow-backed services.

Affected Products

  • Red Hat JBoss Enterprise Application Platform (EAP) builds shipping Undertow (see RHSA-2024:1674, RHSA-2024:1675, RHSA-2024:1676, RHSA-2024:1677)
  • Red Hat Build of Apache Camel and related middleware updates (RHSA-2024:2763, RHSA-2024:2764, RHSA-2024:3919)
  • NetApp products bundling vulnerable Undertow versions, as listed in NetApp Security Advisory NTAP-20250207-0001

Discovery Timeline

  • 2024-11-17 - CVE-2023-4639 published to the National Vulnerability Database
  • 2026-04-15 - Last updated in NVD database

Technical Details for CVE-2023-4639

Vulnerability Analysis

The weakness is classified as [CWE-444] Inconsistent Interpretation of HTTP Requests, commonly referred to as HTTP request smuggling at the cookie layer. Undertow's cookie parser handles value-delimiting characters such as quotes, commas, and semicolons in a manner inconsistent with the expectations of upstream proxies, application code, and the cookie standards. When a client submits a crafted Cookie header, the parser splits or merges name/value pairs differently than other components in the request chain. Exploitation requires network access but no authentication or user interaction, and the attack complexity is high because the attacker must shape input that survives intermediate parsers unchanged.

Root Cause

The root cause lies in Undertow's tolerant handling of quoted and delimited cookie values. The parser treats certain delimiter characters as part of cookie content rather than as boundaries. As a result, a single attacker-controlled cookie value can be re-parsed into multiple logical cookies, or absorb a neighboring HttpOnly cookie into its value, exposing data the browser intended to keep server-only.

Attack Vector

An attacker delivers a crafted cookie to a victim browser through any vector that can set cookies for the target origin, including a controlled subdomain or a prior cross-site script execution against a less-protected sibling app. When the browser subsequently sends the cookie alongside legitimate HttpOnly session cookies, Undertow parses the combined Cookie header in a way that places sensitive cookie values inside attacker-readable positions, or introduces spoofed cookies that downstream application logic trusts.

No verified proof-of-concept code has been published. Refer to the Red Hat CVE-2023-4639 advisory and Red Hat Bugzilla Report #2166022 for vendor-confirmed technical details.

Detection Methods for CVE-2023-4639

Indicators of Compromise

  • Inbound Cookie headers containing unusual placement of double-quote ("), comma (,), or unescaped semicolon characters embedded inside cookie values.
  • Application logs showing duplicate cookie names or session identifiers appearing on requests that should not carry them.
  • Sudden session reuse from a new IP shortly after a user visited an unrelated or attacker-influenced origin.

Detection Strategies

  • Inspect HTTP access logs and web application firewall telemetry for malformed Cookie headers, especially those mixing quoted segments with delimiter characters.
  • Compare cookie parsing results between the front-end proxy (for example, HAProxy or NGINX) and Undertow to identify inconsistent interpretation that indicates smuggling.
  • Hunt for authentication events where the session cookie value differs in structure from the value originally issued by the server.

Monitoring Recommendations

  • Enable verbose Undertow request logging in non-production tiers to capture raw Cookie header bytes for review.
  • Forward web server and application logs to a centralized analytics platform and alert on cookie header anomalies and repeated cookie name collisions.
  • Track the Undertow library version reported by JBoss EAP and middleware components against the fixed versions documented in the relevant RHSA advisories.

How to Mitigate CVE-2023-4639

Immediate Actions Required

  • Inventory all applications and appliances that embed Undertow, including JBoss EAP, Red Hat middleware, and NetApp products listed in NTAP-20250207-0001.
  • Apply the vendor-supplied patches from the Red Hat advisories that match your deployed product channels.
  • Rotate session identifiers and any cookies that may have been exposed during the exposure window.

Patch Information

Red Hat has released fixed packages across multiple product streams. Apply the update that matches your installed product: RHSA-2024:1674, RHSA-2024:1675, RHSA-2024:1676, RHSA-2024:1677, RHSA-2024:2763, RHSA-2024:2764, and RHSA-2024:3919. NetApp customers should follow the remediation guidance in NTAP-20250207-0001.

Workarounds

  • Place a strict reverse proxy in front of Undertow that normalizes or rejects Cookie headers containing quoted values and embedded delimiter characters.
  • Enforce the __Host- cookie prefix and Secure plus HttpOnly flags on session cookies to reduce the scope of cookies an attacker can inject from sibling origins.
  • Restrict cookie scope using narrowly defined Domain and Path attributes so cross-application cookie collisions are minimized until patches are applied.
bash
# Example NGINX reverse proxy guard: drop requests with suspicious cookie delimiters
map $http_cookie $bad_cookie {
    default 0;
    "~*[\",]"     1;
}

server {
    listen 443 ssl;
    server_name app.example.com;

    if ($bad_cookie) {
        return 400;
    }

    location / {
        proxy_pass http://undertow_backend;
        proxy_set_header Host $host;
    }
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.