Update dependency io.netty:netty-codec-http to v4.2.16.Final [SECURITY] - #1132
Open
renovate[bot] wants to merge 1 commit into
Open
Update dependency io.netty:netty-codec-http to v4.2.16.Final [SECURITY]#1132renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1132 +/- ##
==========================================
- Coverage 9.58% 8.49% -1.09%
+ Complexity 2057 1625 -432
==========================================
Files 8398 8398
Lines 80603 80603
Branches 363 363
==========================================
- Hits 7726 6851 -875
- Misses 72685 73585 +900
+ Partials 192 167 -25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.2.15.Final→4.2.16.FinalNetty SPDY SETTINGS frame count materializes unbounded settings map
CVE-2026-55831 / GHSA-6jqx-86gh-f27w
More information
Details
Summary
Netty's SPDY SETTINGS decoder accepts a peer-declared SETTINGS entry count up to the 24-bit frame-length limit and materializes every unique setting ID in
DefaultSpdySettingsFramewithout an implementation-level count cap. A remote SPDY/3.1 peer can send one syntactically valid roughly 2 MiB SETTINGS frame that creates 262144 map entries, amplifying network input into heap growth and ordered-map insertion work.Details
Inbound SPDY bytes enter
SpdyFrameCodec.decode()and are passed directly to the frame decoder. The decoder reads the peer-controlled flags and 24-bit frame length from the common header, then accepts SETTINGS frames with onlylength >= 4. For SETTINGS payloads, it reads the peer-controllednumSettingsfield and validates only that the remaining payload is divisible into 8-byte entries and exactly matches that count. Each accepted entry then supplies an attacker-controlled 24-bit ID and value, and the normal delegate path forwards it intospdySettingsFrame.setValue(). The sink isDefaultSpdySettingsFrame: it backs settings with aTreeMap, checks only that IDs fit the SPDY 24-bit maximum, and inserts a newSettingfor each previously unseen ID. There is no count budget between the wire-format count validation and the TreeMap insertion site.PoC
poc.zip
run with
expected output:
The
NETTY_SPDY_SETTINGS_COUNT_MAP_TRIGGEREDline means the harness decoded the crafted SETTINGS frame and observed all 262144 peer-selected IDs in the resulting settings map. Thewire_bytes=2097164,first_value=1, andlast_value=262144fields distinguish this from a setup failure: they show the exact oversized frame was accepted and fully materialized.Impact
remote unauthenticated network peer that can speak SPDY/3.1 to a Netty pipeline containing
SpdyFrameCodeccan trigger resource-exhaustion denial of service. The required guards are satisfied by a complete valid SETTINGS frame using the expected SPDY version, a length of4 + numSettings * 8, and IDs within the accepted 24-bit range; the verified PoC usesnumSettings=262144andwire_bytes=2097164. On that input, Netty materializes 262144 attacker-controlled entries in a TreeMap-backedDefaultSpdySettingsFrame, with local runs observing about 17-18 MiB of heap growth per decoded frame plus CPU work for ordered-map insertion.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Netty SPDY zlib header block continues decoded expansion after maxHeaderSize truncation
CVE-2026-55833 / GHSA-mvh2-crg5-v77c
More information
Details
Summary
Netty SPDY header decoding continues inflating zlib-compressed header blocks after the raw header parser has already exceeded maxHeaderSize and marked the frame truncated. At commit b2d2137c4404af425bf9d5d601a62576f5c06925, a 12,253-byte compressed SPDY header block can declare and inflate a 12 MiB header-name field with maxHeaderSize=16, forcing compression-amplified decode and skip work in a reachable SpdyFrameCodec pipeline.
PoC
poc.zip
run with:
expected output:
The fingerprint means the compressed input was fully consumed while the raw header parser ended with
truncated=trueandinvalid=falseafter processing the oversized decoded name. That specific state distinguishes this bug from a generic setup failure: the maxHeaderSize guard fired, but the zlib/raw decode path still inflated and skipped the full 12 MiB declared name.Impact
A remote unauthenticated peer that can speak SPDY to a Netty pipeline containing SpdyFrameCodec can send a small compressed HEADERS block that expands into much larger raw header data after the configured maxHeaderSize limit has already been exceeded. The attack requires a reachable SPDY codec, ordinary transport setup such as TCP and optional TLS, and no independent compressed-frame-size or connection-rate limit ahead of SpdyFrameCodec. The satisfied protocol guards are straightforward: the HEADERS frame uses a nonzero stream id and length >= 4, the decoder factory selects the zlib decoder, the payload uses the SPDY dictionary, and the raw block appends a zero-length value so the already-truncated frame reaches END_HEADER_BLOCK. The user-visible effect is denial of service through compression-amplified CPU and allocation churn.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Netty: [SpdyHttpDecoder] ByteBuf Reference Leak on RST_STREAM Leads to Native Memory Exhaustion
CVE-2026-56745 / GHSA-jppx-w49h-x2qq
More information
Details
The
SpdyHttpDecoderhandler in Netty's SPDY-to-HTTP codec allocates a pooledByteBufwhen processing a client-initiatedSYN_STREAMframe withFLAG_FIN=0, storing the partially-constructedFullHttpRequestin an internal map (messageMap) to accumulate subsequentDATAframes. When the remote peer sends anRST_STREAMfor that stream, or when the accumulated content exceedsmaxContentLength, the decoder removes the entry from the map but never releases the pooled ByteBuf, permanently leaking the allocated memory.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Netty: Security Control Bypass via CORS Short-Circuit Failure
CVE-2026-56746 / GHSA-6cqp-g7gg-8hr5
More information
Details
Summary
Netty's CorsHandler provides a
shortCircuit()configuration designed to reject unauthorized cross-origin requests immediately, acting as a security control before requests reach the application. However, due to a logical operator error in the origin evaluation process, this protection can be entirely bypassed. An attacker can bypass the short-circuit mechanism by sending a request with anOrigin: nullheader. This failure forwards unauthorized requests to the backend application, bypassing intended access controls.Details
In
io.netty.handler.codec.http.cors.CorsHandler#channelRead, the short-circuit logic relies on the configuration returned bygetForOrigin(origin)to determine if an origin is authorized. IfgetForOriginreturns a configuration object, the short-circuit check(!(origin == null || config != null))is bypassed, and the request proceeds to the backend.The vulnerability is located in the
getForOriginmethod:If an attacker sends
Origin: null,NULL_ORIGIN.equals(requestOrigin)evaluates to true. The method returns the configuration object regardless of whetherisNullOriginAllowed()was configured by the developer. The short-circuit is bypassed.Impact
Applications relying on CorsHandler's short-circuit feature to prevent unauthorized cross-origin requests from reaching their backend logic are completely exposed. The framework fails to enforce the developer's intended access controls, allowing unauthorized requests to be processed.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Netty: WebSockets V07/V08 handshaker missing Connection/Upgrade validation
CVE-2026-59898 / GHSA-4mp9-239f-g9hg
More information
Details
Summary
An attacker can force WebSocket upgrade via the lax V07 (or V08) handshaker by sending
Sec-WebSocket-Version: 7and omittingConnection: Upgrade/Upgrade: websocketheaders, completing a protocol switch that a proxy would not recognize as an Upgrade request and enabling HTTP request smuggling / protocol-confusion attacks.Severity
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Netty: [HttpContentEncoder] Unbounded Per-Connection Queue Growth via HTTP/1.1 Pipelining Leads to Denial of Service
CVE-2026-59899 / GHSA-q4f6-jm68-57ww
More information
Details
Impact
HttpContentEncoder(the superclass of the production handlerHttpContentCompressor) maintains a per-channelArrayDeque<CharSequence>namedacceptEncodingQueuethat accumulates attacker-controlled data without any size limit. The queue is filled on the I/O thread for every inbound HTTP request and drained only when the application later writes a non-1xx response. This creates a resource exhaustion vulnerability when an attacker exploits HTTP/1.1 pipelining to flood the connection with requests faster than the application produces responses.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Netty: CRLF Injection via Multipart Filename in Netty HttpPostRequestEncoder
CVE-2026-59921 / GHSA-gcjf-9mgh-3p7g
More information
Details
Security Vulnerability Report: CRLF Injection via Multipart Filename in Netty HttpPostRequestEncoder
1. Vulnerability Summary
io.netty.handler.codec.http.multipart.HttpPostRequestEncoderCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N2. Affected Components
The following classes in the
codec-httpmodule are affected:io.netty.handler.codec.http.multipart.HttpPostRequestEncoder— directly concatenates unvalidated filename/name intoContent-DispositionMIME headers (lines 519, 633, 674, 682, 686-688)io.netty.handler.codec.http.multipart.DiskFileUpload—setFilename()only checks null (line 78)io.netty.handler.codec.http.multipart.MemoryFileUpload—setFilename()only checks null (line 60)io.netty.handler.codec.http.multipart.MixedFileUpload—setFilename()delegates without validation (line 62)3. Vulnerability Description
Netty's
HttpPostRequestEncoderconstructs multipart HTTP request bodies by directly concatenating user-supplied filenames and field names intoContent-DispositionMIME headers without validating or sanitizing CRLF characters (\r\n). Since MIME headers are delimited by CRLF, an attacker who controls the filename can inject arbitrary MIME headers into the multipart body part.Root Cause
In
HttpPostRequestEncoder.java, multiple code paths directly embedfileUpload.getFilename()into header strings:The
setFilename()method in allFileUploadimplementations only checks for null:Comparison with Similar Fixed CVEs
This vulnerability follows the same pattern as:
SmtpUtils.validateSMTPParameters()HttpUtil.validateRequestLineTokens()The multipart encoder has no equivalent validation for filenames or field names.
4. Exploitability Prerequisites
This vulnerability is exploitable when:
HttpPostRequestEncoderto construct multipart HTTP requestsCommon affected patterns:
5. Attack Scenarios
Scenario 1: Content-Type Override via Filename Injection
An attacker uploads a file with a crafted filename to override the Content-Type of the multipart body part, potentially enabling stored XSS:
Wire format:
If the receiving server parses the first
Content-Type, the file is treated as HTML instead of JPEG, enabling XSS when the file is served back.Scenario 2: Arbitrary MIME Header Injection
Injects arbitrary headers into the multipart body part that may be processed by downstream middleware or application logic.
Scenario 3: Multipart Boundary Confusion
By injecting a new boundary delimiter, the attacker can:
6. Proof of Concept
Full Runnable PoC Source Code (MultipartFilenameInjectionPoC.java)
How to Compile and Run
PoC Execution Output (Verified on Netty 4.2.12.Final)
7. Impact Analysis
application/octet-streamtotext/htmlto serve executable content<script>tags via Content-Type override when uploaded files are served back8. Remediation Recommendations
Option 1: Validate in FileUpload.setFilename() (Recommended)
Option 2: Sanitize in HttpPostRequestEncoder (Defense-in-Depth)
Escape or reject CRLF characters when building Content-Disposition headers:
Option 3: RFC 2231/5987 Encoding for Filenames
Use proper RFC 2231 encoding for filenames with special characters:
9. References
Severity
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.