Repository navigation
[Aikido] Fix 38 security issues in netty-handler, netty-codec-http2, netty-codec-http and 6 more - #406
Open
aikido-autofix[bot] wants to merge 1 commit into
Conversation
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.
Fixes Netty TLS SNI bypass allowing unauthenticated mTLS circumvention, and Spring UriComponentsBuilder open redirect/SSRF flaws via host validation bypass.
✅ The breaking changes in the upgraded packages do not affect this codebase:
Spring Framework (5.3.20 => 5.3.41): The codebase does not use Spring Expression Language (SpEL) features. No usage of
SimpleEvaluationContext,ExpressionParser,parseExpression, or SpEL annotations like@Value,@Cacheable,@PreAuthorizewas found in the agent or agent_api modules. Spring dependencies are only used for test purposes in the agent_api module.Netty (4.1.135.Final => 4.1.138.Final): While Netty is a transitive dependency through Javalin, the codebase does not directly import or use any Netty classes. There is no code that relies on HTTP/2 frame hashCode values, performs HTTP header validation, or interacts with Netty's HTTP/2 codec APIs.
Jetty (11.0.24 => 11.0.33): The codebase does not implement
HttpChannel.Listeneror useonResponseBegincallbacks. Jetty is used as an embedded server through Javalin, but there is no direct interaction with Jetty's listener APIs or response header modification in listeners.The agent instruments web frameworks at a higher level (Javalin, Spring MVC, Spring Webflux) without directly interacting with the underlying HTTP server implementations or SpEL evaluation contexts.
All breaking changes by upgrading io.netty:netty-codec-http2 from version 4.1.135.Final to 4.1.138.Final (CHANGELOG)
All breaking changes by upgrading io.netty:netty-codec-http2 from version 4.1.135.Final to 4.1.138.Final (CHANGELOG)
✅ 45 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
String.toLowerCase()introduces locale-dependent exceptions that can cause fields to be improperly protected, potentially allowing attackers to bypass security checks based on case...Users of affected versions should upgrade to the corresponding fixed version.
Users of older, unsupported versions could enforce a size limit on "If-Match" and "If-None-M...
SslContextinstead of the intended SNI-specific one. In deployments that rely solely on SNI-selectedSslContexts to enforce mutual TLS (mTLS), where the default context do...X509TrustManagerby wrapping it, and on the OpenSSL provider that wrapping relies onUnsafe-based reflection. On Java 25 and laterUnsafeis unavailable by default, so the wrapping silently fails and the unwra...This was done because the initial specification for HTTP did not specify explicitly a charset, and it was assumed to be ISO-8859-1 for historical reasons.
If t...
DelegatingDecompressorFrameListenerleaks directByteBufmemory when a remote peer sendsDATAframes for a stream whose decompressor channel has already been closed. InHttp2Decompressor.decompress(...),data.retain()incremen...HttpConversionUtil.toHttp2Headers()prioritizes the HTTP/1Hostheader over the authority carried in an absolute-form request-target, contrary to RFC 9112 which requires the request-target authority to take precedence. A request such as `GET...HttpConversionUtil.toHttp2Headers()does not special-case an HTTP/1 CONNECT request in authority-form. Instead of deriving:authorityfrom the CONNECT request-target, it uses the HTTP/1Hostheader, producing a malformed HTTP/2 CONNECT...:protocolpseudo-header and the Extended-CONNECT:path. A request carrying:protocol=websocketand:path=/admin/wsto `:authority=ws.example:...DefaultHttp2HeadersEncoderaccepts without a cap. TheHpackEncoderthen retains every unique outbound header indefinitely, degrading header lookups to O(n^2). Throughp...Sec-WebSocket-Version: 7and omittingConnection: Upgrade/ `Upgra...HttpContentEncoder(the superclass of the production handlerHttpContentCompressor) maintains a per-channelArrayDeque<CharSequence>named `acceptEncodi...maxHeaderSizeand marked th...SpdyHttpDecoderhandler in Netty's SPDY-to-HTTP codec allocates a pooledByteBufwhen processing...ByteBufper HTTP/2DATAframe in applications tha...Http2StreamFrameToHttpObjectCodecandInboundHttp2ToHttpAdapter) fails to deduplicate or validateHosthe...HttpServerCodecpairs each outbound response to a request by polling the recorded request method, including for 1xx interim responses. When pipelined GET and HEAD requests are combined with a client sendingExpect: 100-continue, responses are mismatched to requests: the HEA...WebSocketServerExtensionHandlerstores one queue entry for every inbound HTTP request and removes an entry only when a response is written. Nothing limits that per connection queue, including for requests that are not WebSocket upgrades. A client that pipelines requests faste...SpdySessionHandleraccepts remote initiated SPDY streams up toInteger.MAX_VALUEbecauselocalConcurrentStreamshas that default and no setter. A peer can send manySYN_STREAMframes that stay open and force unbounded heap and direct memory use until the process runs ou...HttpServerCodecinnetty-codec-httprecords the method of each pipelined request that has not yet been answered. The first 32 methods fit in a bit field, and every later method is appended tomethodOverflowQueuewith no size limit. A client that pipelines many requests on...RtspMethods.valueOf()trims trailing control bytes before looking up an RTSP method. A token such asPLAY\u0000can therefore be interpreted differently by an upstream authorization layer and Netty, allowing a prohibited method to pass policy checks.Transfer-Encodingvalues wherechunkedis not the final coding. Different HTTP components may then disagree about message framing, allowing a crafted request to be interpreted as multiple requests.HttpObjectDecoderinnetty-codec-httpaccepts aTransfer-Encodingvalue whenchunkedappears but is not the final transfer coding. This is an incomplete fix for CVE-2026-42585. A header split across lines, or a value such aschunked, xchunked, is still decoded as chun...Bzip2Decoderhandler in Netty's compression codec pipeline is vulnerable to a denial-of-service attack through a malformed bzip2 stream that permanently capt...SessionAuthentication. Applications that persist or serialize sessions can therefore write those credentials to storage or expose them through session replication.reactor-netty-httpcan leak credentials during a WebSocket handshake redirect to a different origin. This happens when the HTTP client is explicitly configured to follow redirects. A remote party that triggers such a redirect can receive credentials meant for the original h...reactor-netty-httpcan mis-evaluate the remote IP address when HAProxy Protocol is enabled. Access-control or logging decisions that trust that address may then use the wrong client identity. The issue only applies when the server is configured to use HAProxy Protocol. The ...reactor-netty-httpconsumes excessive memory when a client sends HTTP/1.1 pipelined requests on a single connection. A remote sender can degrade or exhaust the server by pipelining many requests. Availability of other connections is then reduced. The patch bounds memory use...reactor-coreFlux.windowTimeoutwith fair backpressure can hang after a 20-bit index wrap on a long-lived stream. A client that keeps the stream open and manipulates read speed can stop element processing without an error. Held subscriptions then exhaust resources. The patch pr...🔗 Related Tasks
🤖 Remediation details
Security dependency update (Gradle,
agentmodule)This PR fixes the Netty, Reactor and Spring advisories in the
agentmodule. The affected packages arenetty-handler,netty-codec-http2,netty-codec-http,netty-codec-socks,netty-codec,netty-codec-dns,reactor-netty-http,reactor-netty-core,reactor-coreandspring-web. Two directcompileOnlyversions were bumped inagent/build.gradle, andagent/gradle.lockfilewas regenerated by Gradle.The Jetty advisories (
jetty-security) and one low-severity Spring advisory remain open. The patched artifacts are not published in the configured repositories, so this PR cannot fix them.io.netty:netty-handler
Transitive through
reactor-netty-http. Bumping that parent from 1.2.18 to 1.3.9 moves it from 4.1.135.Final to 4.2.20.Final. That is above the required 4.1.137.Final and 4.2.17.Final.io.netty:netty-codec-http2
Transitive through
reactor-netty-http. Version 1.3.7 would only bring Netty 4.2.17, which is below the 4.2.18 / 4.1.138 floor. The parent was therefore set to 1.3.9, which resolves this package to 4.2.20.Final.io.netty:netty-codec-http
Transitive through
reactor-netty-http. Thereactor-netty-http1.3.9 bump resolves it to 4.2.20.Final. That is above the highest required fix, 4.2.18 / 4.1.138.io.netty:netty-codec-socks
Transitive through
reactor-netty-http(via the Netty proxy handler). Thereactor-netty-http1.3.9 bump resolves it to 4.2.20.Final. That is above the required 4.1.137 and 4.2.17.io.netty:netty-codec
In 4.2,
netty-codecis split intonetty-codec-baseandnetty-codec-compression, so the plainnetty-codecartifact no longer appears in the lockfile. The 4.2.20.Final split modules resolve through the samereactor-netty-http1.3.9 bump. This removes the vulnerable 4.1.135 artifact.io.netty:netty-codec-dns
Transitive through
reactor-netty-http(vianetty-resolver-dns). Thereactor-netty-http1.3.9 bump resolves it to 4.2.20.Final. That is above the required 4.1.136 and 4.2.16.io.projectreactor.netty:reactor-netty-http
This is a direct
compileOnlydependency. It was bumped from 1.2.18 to 1.3.9 inagent/build.gradle, which is above the 1.3.7 patched version. 1.3.9 was chosen over 1.3.7 because 1.3.7 pulls in Netty 4.2.17, which would leave some Netty advisories open. This is a minor bump on the same major line.io.projectreactor.netty:reactor-netty-core
Transitive through
reactor-netty-http. The parent bump to 1.3.9 moves it to 1.3.9, above the required 1.3.7.io.projectreactor:reactor-core
Transitive through
reactor-netty-http. The parent bump to 1.3.9 moves it from 3.7.19 to 3.8.9, above the required 3.8.7.org.springframework:spring-web
This is a direct
compileOnlydependency. It was bumped from 5.3.20 to 5.3.39, the newest 5.3.x release available in the configured repositories. This fixes the Spring advisories patched in 5.3.32 to 5.3.38. AIKIDO-2024-10361 needs 5.3.41, which is unreachable, and moving to 6.x would be a major bump. Spring siblingsspring-core,spring-beansandspring-jclmoved with it.Version changes
reactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpnetty-codec-base/netty-codec-compression4.2.20.Final)reactor-netty-httpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpbumpreactor-netty-httpreactor-netty-httpreactor-netty-http1.3.9reactor-netty-http1.3.9reactor-netty-http1.3.9spring-webbumpspring-webbumpspring-webbumpshadowR8by Gradle lockfile regeneration; not a runtime dependency