{"id":"CVE-2026-55851","aliases":["CVE-2026-55851","GHSA-q6cq-mhr2-jmr5"],"related":[],"kind":"vulnerability","state":"published","title":"Netty codec-haproxy: Signed-Byte Sentinel Collision in HAProxyMessageDecoder Leads to Unbounded Memory Exhaustion","summary":"Netty is a network application framework for development of protocol servers and clients. In versions 4.2.0.Final up to (but not including) 4.2.16.Final, and 4.1.0.Final up to (but not including) 4.1.135, the `HAProxyMessageDecoder` in Netty's `codec-haproxy` module performs protocol version detection by reading the 13th byte as a signed Java `byte` and widening it to `int` without masking; a PROXY protocol v2 binary prefix followed by version byte `0xFF` sign-extends to `-1`, collides with the decoder's need-more-data sentinel, and causes `ByteToMessageDecoder` to accumulate inbound bytes in an unbounded `cumulation` buffer until direct memory is exhausted. This issue is fixed in versions 4.1.136.Final and 4.2.16.Final.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Netty is a network application framework for development of protocol servers and clients. In versions 4.2.0.Final up to (but not including) 4.2.16.Final, and 4.1.0.Final up to (but not including) 4.1.135, the `HAProxyMessageDecoder` in Netty's `codec-haproxy` module performs protocol version detection by reading the 13th byte as a signed Java `byte` and widening it to `int` without masking; a PROXY protocol v2 binary prefix followed by version byte `0xFF` sign-extends to `-1`, collides with the decoder's need-more-data sentinel, and causes `ByteToMessageDecoder` to accumulate inbound bytes in an unbounded `cumulation` buffer until direct memory is exhausted. This issue is fixed in versions 4.1.136.Final and 4.2.16.Final.","source":"cvelist"},{"lang":"en","text":"The `HAProxyMessageDecoder` in netty's `codec-haproxy` module performs protocol version detection by reading the 13th byte of the inbound stream as a signed Java `byte` and widening it to `int` without masking. When an attacker sends a PROXY protocol v2 binary prefix (`0D 0A 0D 0A 00 0D 0A 51 55 49 54 0A`) followed by version byte `0xFF`, the sign extension produces `-1`, which collides with the decoder's \"need more data\" sentinel value. This collision traps the decoder in a version-detection loop where it perpetually requests more data without consuming any bytes, never instantiates the `HeaderExtractor` that enforces header size limits, and causes `ByteToMessageDecoder` to accumulate all subsequent inbound bytes into an unbounded `cumulation` buffer until the JVM exhausts its direct memory allocation.","format":"markdown","source":"ghsa"}],"published":"2026-07-21T21:22:34.879Z","modified":"2026-09-10T03:51:11.783Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":">= 4.2.0.Final, < 4.2.16.Final","status":"affected"},{"version":">= 4.1.0.Final, < 4.1.136.Final","status":"affected"}],"vendor":"netty","product":"netty","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.2.0.Final","status":"affected","fixed":"4.2.16.Final"}],"ecosystem":"Maven","package":"io.netty:netty-codec-haproxy","purl":"pkg:maven/io.netty/netty-codec-haproxy","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.1.0.Final","status":"affected","fixed":"4.1.136.Final"}],"ecosystem":"Maven","package":"io.netty:netty-codec-haproxy","purl":"pkg:maven/io.netty/netty-codec-haproxy","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.1.0","fixed":"4.1.136"},{"status":"affected","introduced":"4.2.0","fixed":"4.2.16"}],"vendor":"netty","product":"netty","cpe":"cpe:2.3:a:netty:netty:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/netty/netty/security/advisories/GHSA-q6cq-mhr2-jmr5","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/netty/netty/commit/5b68c61f37aa4a3045cba624cbea239655c9003b","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/netty/netty/commit/bb2ff68a1fb71cb4b0eb9a9e17b66c52aff680c6","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/netty/netty/releases/tag/netty-4.1.136.Final","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/netty/netty/releases/tag/netty-4.2.16.Final","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55851","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/netty/netty","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-23T14:04:36.269Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55851","url":"https://www.cve.org/CVERecord?id=CVE-2026-55851","licence":"CVE Terms of Use","modified":"2026-07-23T14:04:47.858Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q6cq-mhr2-jmr5","url":"https://github.com/advisories/GHSA-q6cq-mhr2-jmr5","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:11.783Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55851","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55851","licence":"Public domain","modified":"2026-07-30T14:48:31.250Z"}],"updatedAt":"2026-11-25T22:59:29.461Z","epss":{"score":0.00612,"percentile":0.50657,"date":"2026-12-01T12:00:22.000Z"}}