Io.netty:netty codec redis: Netty: RedisArrayAggregator max-elements failure leaves retained partial aggregate state (CVE-2026-56818)
A vulnerability in io.netty:netty-codec-redis's RedisArrayAggregator causes retained partial aggregate state to persist after a maxElements limit exception. This occurs because the handler does not clear retained state when the maxElements limit is exceeded, unlike the maxNestedArrayDepth limit which triggers cleanup. An unauthenticated peer can exploit this to keep large retained buffers alive until channel closure or message completion. The issue affects versions confirmed in the 4.1.135.Final, 4.2.15.Final, and current 4.2 branch head. A patch is available to fix this by adding proper cleanup on the maxElements failure path.
AI Analysis
Technical Summary
The RedisArrayAggregator component in io.netty:netty-codec-redis fails to clear retained partial aggregate state when the maxElements limit is exceeded during RESP array decoding. While exceeding maxNestedArrayDepth triggers cleanup, exceeding maxElements throws a CodecException without releasing retained ByteBuf references or clearing parser state. This leads to stale aggregate state persisting in the handler if the channel remains open after the exception. The vulnerability allows an unauthenticated peer to keep large pooled buffers pinned, potentially causing resource exhaustion until the channel is closed or the stale aggregate completes. The issue is confirmed in versions 4.1.135.Final, 4.2.15.Final, and the current 4.2 branch head. The suggested fix is to call releaseAndClearDepths() before throwing in the maxElements failure branch, aligning it with the existing nested-depth cleanup behavior.
Potential Impact
An unauthenticated attacker can cause retained buffers and stale parser state to persist in the Redis codec handler after a maxElements limit exception. This can lead to resource exhaustion by pinning large pooled buffers (up to 512MB bulk strings) until the channel is closed or the stale aggregate completes. There is no direct confidentiality impact, but integrity is impacted due to stale parser state continuation. Availability impact is moderate due to potential resource exhaustion. Applications that close the channel or remove the handler on decoder exceptions are not affected by this issue. No known exploits are reported in the wild.
Mitigation Recommendations
A patch is available that adds proper cleanup by calling releaseAndClearDepths() before throwing the CodecException on maxElements limit exceedance. Applications should update to a fixed version that includes this patch. If immediate patching is not possible, ensure that the channel or handler is closed or removed upon decoder exceptions to trigger existing cleanup and prevent stale state retention. Check the vendor advisory or repository for the official patch and apply it accordingly.
Io.netty:netty codec redis: Netty: RedisArrayAggregator max-elements failure leaves retained partial aggregate state (CVE-2026-56818)
Description
A vulnerability in io.netty:netty-codec-redis's RedisArrayAggregator causes retained partial aggregate state to persist after a maxElements limit exception. This occurs because the handler does not clear retained state when the maxElements limit is exceeded, unlike the maxNestedArrayDepth limit which triggers cleanup. An unauthenticated peer can exploit this to keep large retained buffers alive until channel closure or message completion. The issue affects versions confirmed in the 4.1.135.Final, 4.2.15.Final, and current 4.2 branch head. A patch is available to fix this by adding proper cleanup on the maxElements failure path.
CVSS v3.1
Score 6.5medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The RedisArrayAggregator component in io.netty:netty-codec-redis fails to clear retained partial aggregate state when the maxElements limit is exceeded during RESP array decoding. While exceeding maxNestedArrayDepth triggers cleanup, exceeding maxElements throws a CodecException without releasing retained ByteBuf references or clearing parser state. This leads to stale aggregate state persisting in the handler if the channel remains open after the exception. The vulnerability allows an unauthenticated peer to keep large pooled buffers pinned, potentially causing resource exhaustion until the channel is closed or the stale aggregate completes. The issue is confirmed in versions 4.1.135.Final, 4.2.15.Final, and the current 4.2 branch head. The suggested fix is to call releaseAndClearDepths() before throwing in the maxElements failure branch, aligning it with the existing nested-depth cleanup behavior.
Potential Impact
An unauthenticated attacker can cause retained buffers and stale parser state to persist in the Redis codec handler after a maxElements limit exception. This can lead to resource exhaustion by pinning large pooled buffers (up to 512MB bulk strings) until the channel is closed or the stale aggregate completes. There is no direct confidentiality impact, but integrity is impacted due to stale parser state continuation. Availability impact is moderate due to potential resource exhaustion. Applications that close the channel or remove the handler on decoder exceptions are not affected by this issue. No known exploits are reported in the wild.
Mitigation Recommendations
A patch is available that adds proper cleanup by calling releaseAndClearDepths() before throwing the CodecException on maxElements limit exceedance. Applications should update to a fixed version that includes this patch. If immediate patching is not possible, ensure that the channel or handler is closed or removed upon decoder exceptions to trigger existing cleanup and prevent stale state retention. Check the vendor advisory or repository for the official patch and apply it accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-p9jm-q85p-7mcp
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-56818"]
- Ecosystems
- ["Maven"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a77432abf8831d539b45e0c
Added to database: 08/08/2026, 14:54:34 UTC
Last enriched: 08/08/2026, 15:37:56 UTC
Last updated: 08/09/2026, 00:41:15 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.