Netty HAProxy: Unbalanced Reference Count in Nested PP2_TYPE_SSL TLV Parsing Leads to Memory Exhaustion
Package
Affected versions
>= 4.2.0.Final, <= 4.2.14.Final
<= 4.1.134.Final
Patched versions
4.2.15.Final
4.1.135.Final
Description
Published to the GitHub Advisory Database
Jun 11, 2026
Reviewed
Jun 11, 2026
Published by the National Vulnerability Database
Jun 12, 2026
Last updated
Jun 12, 2026
Impact
The HAProxy PROXY protocol v2 codec in netty leaks native or heap memory on every connection when a client sends a syntactically valid header containing nested
PP2_TYPE_SSLTLVs (type-length-value records) at depth two or greater. The leak occurs on the successful parse path — no exception is thrown, the message fires downstream, the decoder removes itself, and the application releases theHAProxyMessagenormally. Yet the underlying cumulation buffer (a pooled, potentially directByteBufallocated by the channel) remains permanently pinned.References