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.
| Package | Affected versions | Patched versions |
|---|---|---|
io.undertow:undertow-coreMaven | >= 2.3.0.Alpha1, < 2.3.11.Final | 2.3.11.Final |
io.undertow:undertow-coreMaven | < 2.2.30.Final | 2.2.30.Final |
Patches
11f93a979d2ac[UNDERTOW-2342] CVE-2023-4639 ignore cookie with improper quotes
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- github.com/advisories/GHSA-3jrv-jgp8-45v3ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-4639ghsaADVISORY
- access.redhat.com/errata/RHSA-2024:1674nvdWEB
- access.redhat.com/errata/RHSA-2024:1675nvdWEB
- access.redhat.com/errata/RHSA-2024:1676nvdWEB
- access.redhat.com/errata/RHSA-2024:1677nvdWEB
- access.redhat.com/errata/RHSA-2024:2763nvdWEB
- access.redhat.com/errata/RHSA-2024:2764nvdWEB
- access.redhat.com/errata/RHSA-2024:3919nvdWEB
- access.redhat.com/security/cve/CVE-2023-4639nvdWEB
- bugzilla.redhat.com/show_bug.cginvdWEB
- github.com/undertow-io/undertow/commit/1f93a979d2ac264798e5779b5b7172dfafe0066fghsaWEB
- security.netapp.com/advisory/ntap-20250207-0001ghsaWEB
- security.netapp.com/advisory/ntap-20250207-0001/nvd
News mentions
0No linked articles in our index yet.