VYPR
High severity7.4NVD Advisory· Published Nov 17, 2024· Updated Apr 15, 2026

CVE-2023-4639

CVE-2023-4639

Description

A flaw was found in Undertow, which incorrectly parses cookies with certain value-delimiting characters in incoming requests. This issue could allow an attacker to construct a cookie value to exfiltrate HttpOnly cookie values or spoof arbitrary additional cookie values, leading to unauthorized data access or modification. The main threat from this flaw impacts data confidentiality and integrity.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
io.undertow:undertow-coreMaven
>= 2.3.0.Alpha1, < 2.3.11.Final2.3.11.Final
io.undertow:undertow-coreMaven
< 2.2.30.Final2.2.30.Final

Patches

1
1f93a979d2ac

[UNDERTOW-2342] CVE-2023-4639 ignore cookie with improper quotes

https://github.com/undertow-io/undertowbaranowbFeb 5, 2024via ghsa
2 files changed · +18 0
  • core/src/main/java/io/undertow/util/Cookies.java+3 0 modified
    @@ -318,6 +318,9 @@ private static void parseCookie(final String cookie, final Set<Cookie> parsedCoo
                             cookieCount = createCookie(name, containsEscapedQuotes ? unescapeDoubleQuotes(cookie.substring(start, i)) : cookie.substring(start, i), maxCookies, cookieCount, cookies, additional);
                             state = 0;
                             start = i + 1;
    +                    } else if (c == ';' || (commaIsSeperator && c == ',')) {
    +                        state = 0;
    +                        start = i + 1;
                         }
                         // Skip the next double quote char '"' when it is escaped by backslash '\' (i.e. \") inside the quoted value
                         if (c == '\\' && (i + 1 < cookie.length()) && cookie.charAt(i + 1) == '"') {
    
  • core/src/test/java/io/undertow/util/CookiesTestCase.java+15 0 modified
    @@ -450,6 +450,21 @@ public void testSameSiteCookie() {
             Assert.assertNull(cookie.getSameSiteMode());
         }
     
    +    @Test
    +    public void testNoDoubleQuoteTermination() {
    +        Map<String, Cookie> cookies = Cookies.parseRequestCookies(4, false, Arrays.asList("CUSTOMER=\"WILE_E_COYOTE\"; BAD=\"X; SHIPPING=FEDEX"), true);
    +        Assert.assertEquals(2, cookies.size());
    +        Cookie cookie = cookies.get("CUSTOMER");
    +        Assert.assertEquals("CUSTOMER", cookie.getName());
    +        Assert.assertEquals("WILE_E_COYOTE", cookie.getValue());
    +        cookie = cookies.get("BAD");
    +        Assert.assertNull(cookie);
    +        cookie = cookies.get("SHIPPING");
    +        Assert.assertEquals("SHIPPING", cookie.getName());
    +        Assert.assertEquals("FEDEX", cookie.getValue());
    +        Assert.assertNotNull(cookie);
    +    }
    +
         // RFC6265 allows US-ASCII characters excluding CTLs, whitespace,
         // double quote, comma, semicolon and backslash as cookie value.
         // This does not change even if value is quoted.
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

14

News mentions

0

No linked articles in our index yet.