CVE-2026-48059: Netty HAProxy Protocol v2 Memory Leak Denial of Service
Netty, a widely-used Java framework for building networked applications, contains a memory leak in its HAProxy PROXY protocol v2 decoder. When a client sends a specially crafted but valid header containing nested SSL metadata records, the decoder fails to properly release the underlying memory buffer. This happens silently—no errors are reported, the connection appears to handle normally, and the leak accumulates with each affected connection. Over time, this can exhaust server memory and cause denial of service. The issue affects Netty versions before 4.1.135.Final and 4.2.15.Final.
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-1286, CWE-401
- 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. Prior to versions 4.1.135.Final and 4.2.15.Final, 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_SSL` TLVs (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 the `HAProxyMessage` normally. Yet the underlying cumulation buffer (a pooled, potentially direct `ByteBuf` allocated by the channel) remains permanently pinned. 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
The vulnerability exists in Netty's HAProxy PROXY protocol v2 codec implementation. The parser correctly validates and processes syntactically valid headers containing nested PP2_TYPE_SSL TLVs (type-length-value records) at depth two or greater. However, the cumulation buffer—a pooled ByteBuf allocated from the channel's memory pool—is not released on the normal completion path. While the HAProxyMessage object itself is properly released by the application layer, the underlying native or heap memory buffer remains pinned in the pool. Each connection matching this pattern leaks its cumulation buffer, preventing garbage collection or buffer pool reuse. The vulnerability manifests as a silent resource leak during successful parsing, not as an exception or parsing failure.
Business impact
Organizations running Netty-based proxy or load-balancer services face gradual memory exhaustion when clients send crafted HAProxy PROXY protocol v2 headers. Unlike crash-inducing vulnerabilities, this leak is insidious: memory usage grows slowly and continuously, potentially remaining unnoticed until the server runs out of available memory and becomes unresponsive. Services handling untrusted or adversary-controlled client connections are most at risk. The impact includes service degradation, eventual forced restart cycles, and potential operational disruption during peak traffic periods.
Affected systems
Netty versions 4.1.0 through 4.1.134.Final and 4.2.0 through 4.2.14.Final are affected. Any application using Netty's HAProxy PROXY protocol v2 decoder is vulnerable if it processes client connections where a malicious or misconfigured client can send HAProxy headers with nested SSL metadata. This includes reverse proxies, load balancers, API gateways, and protocol servers built on Netty that enable HAProxy protocol support.
Exploitability
Exploitation is straightforward: an attacker needs only network access to the affected service and the ability to send a syntactically valid HAProxy PROXY protocol v2 header with nested PP2_TYPE_SSL records. No authentication, special privileges, or complex setup is required. The CVSS vector (AV:N/AC:L/PR:N/UI:N) reflects this ease of access. The vulnerability requires repeated connections to cause noticeable memory exhaustion, making it suitable for distributed or sustained attacks. No public exploit code or in-the-wild activity is currently tracked, but the low barrier to exploitation means weaponization would be trivial.
Remediation
Upgrade affected Netty installations immediately to version 4.1.135.Final or later for the 4.1.x line, or 4.2.15.Final or later for the 4.2.x line. These versions include the fix to properly release the cumulation buffer on successful HAProxy v2 header parsing. If immediate patching is not feasible, consider disabling HAProxy PROXY protocol v2 support in your application configuration, though this may require protocol negotiation changes with upstream proxies.
Patch guidance
Apply patches according to your Netty deployment model: for Maven users, update the netty-codec-http or netty-all dependency to 4.1.135.Final (or 4.2.15.Final if using the 4.2 series) and rebuild. For containerized deployments, rebuild images with the updated Netty library and restart services with new images. Verify the fix by checking that memory usage on the affected service no longer increases monotonically during normal HAProxy protocol v2 traffic. Regression testing should confirm that legitimate HAProxy PROXY protocol v2 connections continue to work correctly after the patch.
Detection guidance
Monitor Netty-based services for gradual, monotonic growth in heap or native memory usage without corresponding increases in active connections or request throughput. Heap dump analysis of affected services may reveal pinned ByteBuf objects from Netty's pooled allocator that have not been released. Network-level detection is less practical since valid HAProxy headers appear legitimate; focus on behavioral anomalies such as out-of-memory errors, garbage collection pauses, or service restarts correlated with client connections using HAProxy protocol v2. Application logs should be reviewed for warnings related to buffer pool exhaustion.
Why prioritize this
While this vulnerability is a denial-of-service rather than code execution or data breach, its silent nature and reliance on continued connection streams makes it operationally impactful. The CVSS score of 7.5 (HIGH) reflects the ease of exploitation and the availability impact. Organizations running Netty-based critical infrastructure (proxies, load balancers, APIs) should prioritize patching to prevent gradual resource exhaustion. The low complexity of exploitation and lack of authentication requirements elevate the priority for any service exposed to untrusted networks.
Risk score, explained
The CVSS 3.1 score of 7.5 (HIGH) assigns maximum points for network accessibility (AV:N), low attack complexity (AC:L), and no privilege or user interaction requirements (PR:N/UI:N). The impact is availability only (A:H, C:N, I:N), reflecting the denial-of-service nature. The score does not account for the potential for distributed, sustained attack or the silent, hard-to-detect nature of the leak; operationally, this vulnerability may warrant higher urgency in resource-constrained environments.
Frequently asked questions
Does this vulnerability allow remote code execution or data theft?
No. The vulnerability is limited to memory exhaustion and denial of service. It does not compromise confidentiality or integrity. An attacker cannot execute arbitrary code or access application data; they can only cause the service to become unresponsive over time.
Can the leak be mitigated without patching Netty itself?
Partial mitigation is possible by disabling HAProxy PROXY protocol v2 support in your application if you do not require it, or by implementing upstream rate limiting on connections sending nested SSL TLVs. However, these are workarounds; upgrading to the patched Netty version is the proper fix.
How quickly does the memory leak manifest in a real deployment?
The leak rate depends on connection volume and buffer sizes. In high-traffic scenarios with many short-lived connections, noticeable memory growth may occur within hours to days. Low-traffic services might take weeks to show symptoms. Monitoring is essential because the leak is silent—no errors or warnings are generated.
Does upgrading Netty require changes to my application code?
No. The patches are library-level fixes that do not change the public API. A simple dependency version bump and rebuild should be sufficient. Comprehensive testing is recommended to ensure no regressions, but code changes are not expected.
This analysis is provided for informational purposes to assist security professionals in risk assessment and remediation planning. The vulnerability details, affected versions, and patch information reflect the current CVE record and vendor advisories as of the publication date. Organizations should verify patch availability and compatibility within their specific deployment environment before applying updates. This assessment does not constitute security advice for any particular system and should be supplemented with internal risk analysis, threat modeling, and testing appropriate to your organization's context and threat landscape. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-48006HIGHNetty Redis Memory Leak – Direct Memory Exhaustion DoS
- CVE-2026-48043MEDIUMNetty HTTP/2 Decompression Memory Leak DoS Vulnerability
- CVE-2025-8873HIGHArista EOS IPsec Denial of Service Vulnerability
- CVE-2026-46178HIGHLinux Kernel RDMA/mlx4 Resource Leak – HIGH Severity
- CVE-2026-46201HIGHLinux Xe Graphics Driver DMA-Buf Attachment Leak
- CVE-2026-46303HIGHLinux isofs Rock Ridge Information Disclosure Vulnerability
- CVE-2026-46309HIGHLinux xe GPU Driver Memory Disclosure via Incoherent Cache Access
- CVE-2026-46679HIGHlibp2p Gossipsub Heap Exhaustion DoS (7.5 HIGH)