CVE-2023-34462: Netty handler Netty-handler SniHandler 16MB Allocation Vulnerability
MODERATECVE-2023-34462 is a MODERATE (CVSS 6.5) netty-handler snihandler 16mb allocation vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Netty handler libraries in the Maven ecosystem. The issue involves netty-handler snihandler 16mb allocation. Remediation is available by upgrading affected packages to version 4.1.94.Final.
CVE-2023-34462 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-34462
To remediate this vulnerability, upgrade all affected Netty handler dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.94.Final</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.netty
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-34462, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.netty
Analyze the terminal output to locate any version of Netty handler in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.94.Final), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.netty command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Netty handler, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-34462 Affected Netty handler Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.netty:netty-handler
|
Maven |
< 4.1.94.Final
|
4.1.94.Final
|
References
Frequently Asked Questions
What is CVE-2023-34462?
Which Netty handler versions are affected?
What version fixes CVE-2023-34462?
Is netty-handler affected?
What is the CVSS score of CVE-2023-34462?
What CWE is associated with CVE-2023-34462?
How can I check Maven dependencies for CVE-2023-34462?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6mjq-h674-j845",
"modified" : "2024-06-24T21:24:21Z",
"published" : "2023-06-20T16:33:22Z",
"aliases" : [ "CVE-2023-34462" ],
"summary" : "netty-handler SniHandler 16MB allocation",
"details" : "### Summary\nThe `SniHandler` can allocate up to 16MB of heap for each channel during the TLS handshake. When the handler or the channel does not have an idle timeout, it can be used to make a TCP server using the `SniHandler` to allocate 16MB of heap.\n\n### Details\nThe `SniHandler` class is a handler that waits for the TLS handshake to configure a `SslHandler` according to the indicated server name by the `ClientHello` record. For this matter it allocates a `ByteBuf` using the value defined in the `ClientHello` record. \n\nNormally the value of the packet should be smaller than the handshake packet but there are not checks done here and the way the code is written, it is possible to craft a packet that makes the `SslClientHelloHandler`\n\n1/ allocate a 16MB `ByteBuf`\n2/ not fail `decode` method `in` buffer\n3/ get out of the loop without an exception\n\nThe combination of this without the use of a timeout makes easy to connect to a TCP server and allocate 16MB of heap memory per connection.\n\n### Impact\nIf the user has no idle timeout handler configured it might be possible for a remote peer to send a client hello packet which lead the server to buffer up to 16MB of data per connection. This could lead to a OutOfMemoryError and so result in a DDOS.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.netty:netty-handler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.1.94.Final"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/netty/netty/security/advisories/GHSA-6mjq-h674-j845"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34462"
}, {
"type" : "WEB",
"url" : "https://github.com/netty/netty/commit/535da17e45201ae4278c0479e6162bb4127d4c32"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/netty/netty"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20230803-0001"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240621-0007"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2023/dsa-5558"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-20T16:33:22Z",
"nvd_published_at" : "2023-06-22T23:15:09Z"
}
}