CVE-2026-44893: Netty HAProxy Codec Memory Leak Denial of Service
Netty's HAProxy protocol decoder has a resource leak vulnerability triggered by malformed protocol messages. When an attacker sends a specially crafted HAProxy TLV (Type-Length-Value) structure with an undersized length field, the decoder attempts to read data beyond the declared bounds. The exception that follows bypasses the error handler, leaving memory buffers permanently unreleased. This cumulates over repeated malicious messages, exhausting available memory and crashing the application.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-703, CWE-805
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-12 / 2026-07-15
NVD description (verbatim)
Netty is a network application framework for development of protocol servers and clients. In netty-codec-haproxy prior to versions 4.1.135.Final and 4.2.15.Final, when decoding a PP2_TYPE_SSL TLV, HAProxyMessage.readNextTLV() first calls `header.retainedSlice(header.readerIndex(), length)` and only then reads the 1-byte client field and 4-byte verify field. If the attacker sets the TLV length below 5, the subsequent readByte/readInt throws IndexOutOfBoundsException. HAProxyMessageDecoder only catches HAProxyProtocolException around this call, so the IOOBE propagates and the retained slice on the pooled cumulation buffer is never released. Versions 4.1.135.Final and 4.2.15.Final patch the issue.
12 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-44893 exists in netty-codec-haproxy's HAProxyMessage.readNextTLV() method. The vulnerability arises from a logic flaw in PP2_TYPE_SSL TLV decoding: a retained slice is created based on attacker-controlled length metadata before validation occurs. The code then attempts to read a 1-byte client field and 4-byte verify field. If length is set below 5 bytes, readByte() or readInt() throws IndexOutOfBoundsException. HAProxyMessageDecoder's exception handler only catches HAProxyProtocolException, allowing IOOBE to propagate uncaught. The retained slice reference is never released, causing the pooled cumulation buffer memory to leak. Repeated exploitation leads to memory exhaustion and denial of service.
Business impact
Availability risk to any service exposing HAProxy protocol endpoints. Applications using netty-codec-haproxy to decode upstream load-balancer or proxy traffic become vulnerable to memory exhaustion attacks. An unauthenticated remote attacker can send low-cost, malformed protocol frames to gradually consume heap memory until the JVM crashes or triggers garbage collection storms that degrade performance. For containerized deployments, this may trigger repeated pod restarts, cascading operational impact across microservices architectures.
Affected systems
Netty versions prior to 4.1.135.Final and 4.2.15.Final are affected. Any application embedding netty-codec-haproxy and accepting HAProxy protocol traffic requires patching. This includes reverse proxies, API gateways, and application servers that sit behind HAProxy or compatible load balancers and parse the protocol on the inbound side.
Exploitability
Exploitability is high. The vulnerability requires no authentication, no user interaction, and no special network conditions—any network-accessible HAProxy protocol listener is at risk. The attack is trivial to execute: send a PP2_TYPE_SSL TLV frame with length < 5. No special tools, exploit frameworks, or zero-day knowledge needed. CVSS 7.5 (HIGH) reflects network-reachable, unauthenticated denial of service with no confidentiality or integrity impact.
Remediation
Upgrade netty-codec-haproxy to version 4.1.135.Final or later (for 4.1.x series) or 4.2.15.Final or later (for 4.2.x series). The patch adds validation to ensure the TLV length is sufficient before attempting field reads, and ensures the retained slice is released even if an exception occurs. Verify compatibility with your application's Netty dependency footprint before deploying.
Patch guidance
1. Identify all applications and services using netty-codec-haproxy in your inventory. 2. Review your Netty bill-of-materials (BOM) or dependency tree for the current version. 3. Plan upgrades to 4.1.135.Final or 4.2.15.Final, depending on your 4.x branch. 4. Test patched builds in a staging environment that includes HAProxy protocol traffic replay or simulation. 5. Deploy during a maintenance window and monitor JVM memory metrics and garbage collection logs for the first 24–48 hours post-deployment to confirm memory leak resolution. 6. If you are not directly managing Netty versions (e.g., Spring Boot, Vert.x, or other frameworks bundle it), verify the parent framework has released a compatible version.
Detection guidance
Monitor applications for: (1) Repeated IndexOutOfBoundsException in HAProxyMessage or HAProxyMessageDecoder logs, especially if unhandled; (2) Steady heap memory growth without corresponding increase in legitimate request volume; (3) Increased garbage collection pauses or full GC frequency; (4) Network packets to HAProxy protocol ports (default 8020/TCP) with suspiciously short PP2_TYPE_SSL TLV payloads (< 5 bytes). Alerting on IOOBE exceptions from Netty codec classes can provide early warning before memory exhaustion manifests. Memory profilers or heap dumps may reveal large numbers of retained ByteBuf references from the pooled allocator.
Why prioritize this
HIGH priority for any public-facing or internal-network-facing service accepting HAProxy protocol input. The attack is trivial, unauthenticated, and leads to application unavailability. Prioritize services in load-balancer frontends, API gateway tiers, and microservices ingress controllers. Organizations with SLAs or uptime commitments should treat this as critical infrastructure and patch within 1–2 weeks.
Risk score, explained
CVSS 7.5 reflects: (1) Network vector—any remote attacker with network access can trigger the flaw; (2) Low attack complexity—no special conditions; (3) No privilege or user interaction required; (4) High availability impact via memory leak and crash; (5) No confidentiality or integrity compromise. The score appropriately captures denial-of-service severity in a protocol decoder serving as a trust boundary to upstream infrastructure.
Frequently asked questions
Does this vulnerability affect Netty applications that do not use the HAProxy codec?
No. Only applications explicitly using netty-codec-haproxy to parse HAProxy protocol frames are at risk. Standard HTTP or TCP applications using Netty without the HAProxy codec are unaffected.
Can this be exploited if HAProxy is running on localhost only?
If HAProxy protocol parsing runs on a network interface bound to localhost (127.0.0.1), exploitation requires local access. However, if the application listens on 0.0.0.0 or a routable IP, remote exploitation is possible. Always verify your application's bind address and firewall posture.
What does 'pooled cumulation buffer' mean in this context?
Netty's direct buffer pooling reuses memory across connections for efficiency. A cumulation buffer aggregates incoming bytes from multiple reads. The leak prevents this pooled memory from being returned to the pool, so it cannot be reused and eventually exhausts the heap.
Will patching cause a performance regression?
The patch adds a length validation check before field reads—a minimal operation. No performance regression is expected; instead, patched versions should show better resilience and stability under adversarial conditions.
This analysis is provided for informational purposes and reflects the vulnerability as described in the official CVE record and vendor advisories. SEC.co makes no warranty as to the completeness or accuracy of third-party software versions, patch release dates, or compatibility matrices. Organizations should verify patch availability and compatibility against their specific software supply chain and consult official vendor documentation. Exploitation of this or any vulnerability without explicit authorization is illegal and unethical. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-44249HIGHNetty IPv6 Subnet Filter Bypass Vulnerability (CVSS 8.1)
- CVE-2026-44250HIGHNetty Redis Codec Denial-of-Service via Nested Array Memory Exhaustion
- CVE-2026-44890HIGHNetty Redis Codec Memory Exhaustion Denial of Service
- CVE-2026-44892HIGHNetty HTTP/3 Header Memory Exhaustion DoS Vulnerability
- CVE-2026-44894HIGHNetty QUIC Amplification Attack via NoQuicTokenHandler Default
- CVE-2026-45416HIGHNetty TLS Memory Exhaustion Denial of Service
- CVE-2026-45674HIGHNetty DNS CNAME Validation Bypass (CVSS 8.7 HIGH)
- CVE-2026-46340HIGHNetty SCTP Memory Exhaustion Denial of Service