CVE-2024-36121: Netty incubator codec ohttp BoringSSLAEADContext Vulnerability
MODERATECVE-2024-36121 is a MODERATE (CVSS 5.9) boringsslaeadcontext vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Netty incubator codec ohttp libraries in the Maven ecosystem. The issue involves boringsslaeadcontext in netty repeats nonces. Remediation is available by upgrading affected packages to version 0.0.11.Final.
CVE-2024-36121 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N).
How to Fix CVE-2024-36121
To remediate this vulnerability, upgrade all affected Netty incubator codec ohttp 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.incubator</groupId>
<artifactId>netty-incubator-codec-ohttp</artifactId>
<version>0.0.11.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.incubator
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-36121, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.netty.incubator
Analyze the terminal output to locate any version of Netty incubator codec ohttp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.11.Final), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.netty.incubator 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-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Netty incubator codec ohttp, 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-2024-36121 Affected Netty incubator codec ohttp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.netty.incubator:netty-incubator-codec-ohttp
|
Maven |
≥ 0.0.3.Final
< 0.0.11.Final
|
0.0.11.Final
|
References
Frequently Asked Questions
What is CVE-2024-36121?
Which Netty incubator codec ohttp versions are affected?
What version fixes CVE-2024-36121?
Is netty-incubator-codec-ohttp affected?
What is the CVSS score of CVE-2024-36121?
What CWE is associated with CVE-2024-36121?
How can I check Maven dependencies for CVE-2024-36121?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g762-h86w-8749",
"modified" : "2024-06-05T16:53:49Z",
"published" : "2024-06-05T16:53:49Z",
"aliases" : [ "CVE-2024-36121" ],
"summary" : "BoringSSLAEADContext in Netty Repeats Nonces",
"details" : "### Summary\nBoringSSLAEADContext keeps track of how many OHTTP responses have been sent and uses this sequence number to calculate the appropriate nonce to use with the encryption algorithm. \nUnfortunately, two separate errors combine which would allow an attacker to cause the sequence number to overflow and thus the nonce to repeat.\n\n### Details\n1. There is no overflow detection or enforcement of the maximum sequence value. (This is a missed requirement from the draft Chunked Oblivious OHTTP RFC and so should be inherited from the HPKE RFC 9180, Section 5.2).\n2. The sequence number (seq) is stored as 32-bit int which is relatively easy to overflow.\n\nhttps://github.com/netty/netty-incubator-codec-ohttp/blob/1ddadb6473cd3be5491d114431ed4c1a9f316001/codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSLAEADContext.java#L112-L114\n\n### Impact\nIf the BoringSSLAEADContext is used to encrypt more than 2^32 messages then the AES-GCM nonce will repeat.\nRepeating a nonce with AES-GCM results in both confidentiality and integrity compromise of data encrypted with the associated key.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.netty.incubator:netty-incubator-codec-ohttp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.3.Final"
}, {
"fixed" : "0.0.11.Final"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/netty/netty-incubator-codec-ohttp/security/advisories/GHSA-g762-h86w-8749"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-36121"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/netty/netty-incubator-codec-ohttp"
}, {
"type" : "WEB",
"url" : "https://github.com/netty/netty-incubator-codec-ohttp/blob/1ddadb6473cd3be5491d114431ed4c1a9f316001/codec-ohttp-hpke-classes-boringssl/src/main/java/io/netty/incubator/codec/hpke/boringssl/BoringSSLAEADContext.java#L112-L114"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-190", "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-05T16:53:49Z",
"nvd_published_at" : "2024-06-04T22:15:10Z"
}
}