CVE-2024-6162
Description
A vulnerability was found in Undertow, where URL-encoded request paths can be mishandled during concurrent requests on the AJP listener. This issue arises because the same buffer is used to decode the paths for multiple requests simultaneously, leading to incorrect path information being processed. As a result, the server may attempt to access the wrong path, causing errors such as "404 Not Found" or other application failures. This flaw can potentially lead to a denial of service, as legitimate resources become inaccessible due to the path mix-up.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
io.undertow:undertow-coreMaven | >= 2.3.0.Alpha1, < 2.3.14.Final | 2.3.14.Final |
io.undertow:undertow-coreMaven | < 2.2.33.Final | 2.2.33.Final |
Patches
290f202ada89b[UNDERTOW-2334] CVE-2024-6162 AJP Parser: Do not share the decodeBuffer StringBuilder instance between requests
1 file changed · +1 −4
core/src/main/java/io/undertow/server/protocol/ajp/AjpRequestParser.java+1 −4 modified@@ -77,7 +77,6 @@ public class AjpRequestParser { private final boolean slashDecodingFlag; private final int maxParameters; private final int maxHeaders; - private StringBuilder decodeBuffer; private final boolean allowUnescapedCharactersInUrl; private final Pattern allowedRequestAttributesPattern; @@ -509,9 +508,7 @@ public void parse(final ByteBuffer buf, final AjpRequestParseState state, final private String decode(String url, final boolean containsUrlCharacters) throws UnsupportedEncodingException { if (doDecode && containsUrlCharacters) { try { - if(decodeBuffer == null) { - decodeBuffer = new StringBuilder(); - } + final StringBuilder decodeBuffer = new StringBuilder(); return URLUtils.decode(url, this.encoding, slashDecodingFlag, false, decodeBuffer); } catch (Exception e) { throw UndertowMessages.MESSAGES.failedToDecodeURL(url, encoding, e);
a28ac53076e2[UNDERTOW-2334] CVE-2024-6162 AJP Parser: Do not share the decodeBuffer StringBuilder instance between requests
1 file changed · +1 −4
core/src/main/java/io/undertow/server/protocol/ajp/AjpRequestParser.java+1 −4 modified@@ -77,7 +77,6 @@ public class AjpRequestParser { private final boolean slashDecodingFlag; private final int maxParameters; private final int maxHeaders; - private StringBuilder decodeBuffer; private final boolean allowUnescapedCharactersInUrl; private final Pattern allowedRequestAttributesPattern; @@ -509,9 +508,7 @@ public void parse(final ByteBuffer buf, final AjpRequestParseState state, final private String decode(String url, final boolean containsUrlCharacters) throws UnsupportedEncodingException { if (doDecode && containsUrlCharacters) { try { - if(decodeBuffer == null) { - decodeBuffer = new StringBuilder(); - } + final StringBuilder decodeBuffer = new StringBuilder(); return URLUtils.decode(url, this.encoding, slashDecodingFlag, false, decodeBuffer); } catch (Exception e) { throw UndertowMessages.MESSAGES.failedToDecodeURL(url, encoding, e);
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
16- github.com/advisories/GHSA-9442-gm4v-r222ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-6162ghsaADVISORY
- access.redhat.com/errata/RHSA-2024:1194nvdWEB
- access.redhat.com/errata/RHSA-2024:4386nvdWEB
- access.redhat.com/errata/RHSA-2024:4884nvdWEB
- access.redhat.com/security/cve/CVE-2024-6162nvdWEB
- bugzilla.redhat.com/show_bug.cginvdWEB
- github.com/undertow-io/undertow/commit/90f202ada89b6d9883beed0f1fe10c99d470d9a8ghsaWEB
- github.com/undertow-io/undertow/commit/a28ac53076e2fa532266d25e0c0b1a01d0e9d2cfghsaWEB
- github.com/undertow-io/undertow/pull/1612ghsaWEB
- github.com/undertow-io/undertow/releases/tag/2.2.33.FinalghsaWEB
- github.com/undertow-io/undertow/releases/tag/2.3.14.FinalghsaWEB
- issues.redhat.com/browse/JBEAP-26268nvdWEB
- issues.redhat.com/browse/UNDERTOW-2334ghsaWEB
- security.netapp.com/advisory/ntap-20241129-0009ghsaWEB
- security.netapp.com/advisory/ntap-20241129-0009/nvd
News mentions
0No linked articles in our index yet.