Repository navigation
[Aikido] Fix 31 security issues in netty-codec-http2, netty-handler, netty-codec-http and 6 more - #399
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.
Upgrade Netty and Reactor dependencies to fix open redirect/SSRF vulnerabilities in URL parsing and HTTP/1-to-HTTP/2 conversion host validation bypass attacks.
✅ No breaking changes for: io.netty:netty-codec-http2, io.netty:netty-handler, io.netty:netty-codec-http, io.netty:netty-codec-http2, io.netty:netty-codec-http, io.netty:netty-codec-socks, io.netty:netty-codec, io.netty:netty-codec-dns
✅ 37 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
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...
String.toLowerCase()introduces locale-dependent exceptions that can cause fields to be improperly protected, potentially allowing attackers to bypass security checks based on case...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:...DelegatingDecompressorFrameListenerleaks directByteBufmemory when a remote peer sendsDATAframes for a stream whose decompressor channel has already been closed. InHttp2Decompressor.decompress(...),data.retain()incremen...DefaultHttp2HeadersEncoderaccepts without a cap. TheHpackEncoderthen retains every unique outbound header indefinitely, degrading header lookups to O(n^2). Throughp...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...
Sec-WebSocket-Version: 7and omittingConnection: Upgrade/ `Upgra...HttpContentEncoder(the superclass of the production handlerHttpContentCompressor) maintains a per-channelArrayDeque<CharSequence>named `acceptEncodi...SpdyHttpDecoderhandler in Netty's SPDY-to-HTTP codec allocates a pooledByteBufwhen processing...ByteBufper HTTP/2DATAframe in applications tha...Http2StreamFrameToHttpObjectCodecandInboundHttp2ToHttpAdapter) fails to deduplicate or validateHosthe...netty-codec-http) security fixes in this release. GHSA-pvjx-v7vp-62vq:HttpServerCodecspills pipelined request methods into an unbounded overflow queue, so a client that pipelines many requests without reading responses exhausts heap. GH...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...Bzip2Decoderhandler in Netty's compression codec pipeline is vulnerable to a denial-of-service attack through a malformed bzip2 stream that permanently capt...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...Flux.bufferTimeoutwith fair backpressure can cause the stream to hang when upstream items arrive during buffer flushing, leaving items unprocessed. An attacker can exploit this to exhaust subscriptions, resulting in denial of service.🔗 Related Tasks
🤖 Remediation details
Bump reactor-netty-http, spring-web, and transitive Netty/Reactor dependencies to address multiple CVEs
Short summary
This PR fixes security vulnerabilities in the following packages:
io.netty:netty-codec-http2,io.netty:netty-handler,io.netty:netty-codec-http,io.netty:netty-codec-socks,io.netty:netty-codec,io.netty:netty-codec-dns,io.projectreactor.netty:reactor-netty-http,io.projectreactor.netty:reactor-netty-core,io.projectreactor:reactor-core, andorg.springframework:spring-web. All vulnerable packages appear inagent/build.gradleas directcompileOnlydependencies or as transitives pulled through them; the resolved versions are recorded inagent/gradle.lockfile.io.netty:netty-codec-http2
netty-codec-http2was resolved transitively at4.1.135.Finalvia the direct dependencyio.projectreactor.netty:reactor-netty-http:1.2.18. Bumpingreactor-netty-httpto1.3.8inagent/build.gradlecaused Gradle to resolve the entire Netty family at4.2.19.Final, which exceeds the minimum patched version of4.1.138.Finalrequired to close the relevant advisories.io.netty:netty-handler
netty-handlerwas resolved transitively at4.1.135.Finalthroughreactor-netty-core:1.2.18, itself a transitive ofreactor-netty-http:1.2.18. The bump ofreactor-netty-httpto1.3.8pulls inreactor-netty-core:1.3.8, which declaresnetty-handler:4.2.19.Final, satisfying the patched floor of4.1.137.Final.io.netty:netty-codec-http
netty-codec-httpwas resolved transitively at4.1.135.Finalviareactor-netty-http:1.2.18. Bumpingreactor-netty-httpto1.3.8resolvesnetty-codec-httpat4.2.19.Final, which meets the patched floor of4.1.137.Finalrequired to address the multiple HTTP codec advisories.io.netty:netty-codec-socks
netty-codec-sockswas resolved transitively at4.1.135.Finalthroughreactor-netty-core:1.2.18→netty-handler-proxy. The bump ofreactor-netty-httpto1.3.8(and thusreactor-netty-coreto1.3.8) resolvesnetty-codec-socksat4.2.19.Final, satisfying the patched floor of4.1.137.Final.io.netty:netty-codec
netty-codecwas resolved transitively at4.1.135.Finalas a dependency of several Netty artifacts pulled in byreactor-netty-http:1.2.18. The bump toreactor-netty-http:1.3.8resolvesnetty-codecat4.2.19.Final, meeting the patched floor of4.1.136.Final.io.netty:netty-codec-dns
netty-codec-dnswas resolved transitively at4.1.135.Finalviareactor-netty-http:1.2.18→netty-resolver-dns. Bumpingreactor-netty-httpto1.3.8resolvesnetty-codec-dnsat4.2.19.Final, satisfying the patched floor of4.1.136.Final.io.projectreactor.netty:reactor-netty-http
reactor-netty-httpis declared directly inagent/build.gradleascompileOnly 'io.projectreactor.netty:reactor-netty-http:1.2.18'and is the owning parent for all the Netty transitive vulnerabilities listed above. The version was bumped to1.3.8— the smallest release that resolves all downstream Netty artifacts at or above their respective patched floors and also satisfies thereactor-netty-httpadvisory requiring>=1.3.7.io.projectreactor.netty:reactor-netty-core
reactor-netty-corewas resolved transitively at1.2.18as a direct dependency ofreactor-netty-http:1.2.18. Bumpingreactor-netty-httpto1.3.8pulls inreactor-netty-core:1.3.8, which satisfies the patched floor of1.3.7required by the relevant advisory.io.projectreactor:reactor-core
reactor-corewas resolved transitively at3.7.19viareactor-netty-core:1.2.18. Bumpingreactor-netty-httpto1.3.8causesreactor-netty-core:1.3.8to declarereactor-core:3.8.8, which satisfies the patched floor of3.8.7required by the relevant advisories.org.springframework:spring-web
spring-webis declared directly inagent/build.gradleascompileOnly 'org.springframework:spring-web:5.3.20'. The version was bumped to5.3.39— the highest published5.3.xrelease — which satisfies the patched floors for all Spring Framework CVEs addressed here (5.3.32,5.3.33,5.3.34,5.3.38). The co-resolved Spring artifactsspring-beans,spring-core, andspring-jclmoved to5.3.39as a result of the same lockfile refresh.Version changes
io.projectreactor.netty:reactor-netty-http1.2.181.3.8io.projectreactor.netty:reactor-netty-core1.2.181.3.8io.projectreactor:reactor-core3.7.193.8.8io.netty:netty-codec-http24.1.135.Final4.2.19.Finalio.netty:netty-codec-http4.1.135.Final4.2.19.Finalio.netty:netty-handler4.1.135.Final4.2.19.Finalio.netty:netty-codec-socks4.1.135.Final4.2.19.Finalio.netty:netty-codec4.1.135.Final4.2.19.Finalio.netty:netty-codec-dns4.1.135.Final4.2.19.Finalio.netty:netty-buffer4.1.135.Final4.2.19.Finalio.netty:netty-common4.1.135.Final4.2.19.Finalio.netty:netty-transport4.1.135.Final4.2.19.Finalio.netty:netty-handler-proxy4.1.135.Final4.2.19.Finalio.netty:netty-resolver4.1.135.Final4.2.19.Finalio.netty:netty-resolver-dns4.1.135.Final4.2.19.Finalio.netty:netty-resolver-dns-classes-macos4.1.135.Final4.2.19.Finalio.netty:netty-resolver-dns-native-macos4.1.135.Final4.2.19.Finalio.netty:netty-transport-classes-epoll4.1.135.Final4.2.19.Finalio.netty:netty-transport-native-epoll4.1.135.Final4.2.19.Finalio.netty:netty-transport-native-unix-common4.1.135.Final4.2.19.Finalio.netty:netty-codec-http34.2.19.Finalio.netty:netty-codec-base4.2.19.Finalio.netty:netty-codec-compression4.2.19.Finalio.netty:netty-codec-classes-quic4.2.19.Finalorg.springframework:spring-web5.3.205.3.39org.springframework:spring-beans5.3.205.3.39org.springframework:spring-core5.3.205.3.39org.springframework:spring-jcl5.3.205.3.39org.jspecify:jspecify1.0.1