CVE-2022-41915: Netty codec http Netty Vulnerable To HTTP Response Vulnerability
MODERATECVE-2022-41915 is a MODERATE (CVSS 6.5) netty vulnerable to http response vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting Netty codec http libraries in the Maven ecosystem. The issue involves netty vulnerable to http response splitting from assigning header value iterator. Remediation is available by upgrading affected packages to version 4.1.86.Final.
CVE-2022-41915 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:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2022-41915
To remediate this vulnerability, upgrade all affected Netty codec http 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-codec-http</artifactId>
<version>4.1.86.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-2022-41915, 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 codec http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.86.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-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. In Netty codec http, 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-2022-41915 Affected Netty codec http Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.netty:netty-codec-http
|
Maven |
≥ 4.1.83.Final
< 4.1.86.Final
|
4.1.86.Final
|
References
Frequently Asked Questions
What is CVE-2022-41915?
Which Netty codec http versions are affected?
What version fixes CVE-2022-41915?
Is netty-codec-http affected?
What is the CVSS score of CVE-2022-41915?
What CWE is associated with CVE-2022-41915?
How can I check Maven dependencies for CVE-2022-41915?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hh82-3pmq-7frp",
"modified" : "2023-01-10T23:07:13Z",
"published" : "2022-12-12T21:25:44Z",
"aliases" : [ "CVE-2022-41915" ],
"summary" : "Netty vulnerable to HTTP Response splitting from assigning header value iterator",
"details" : "### Impact\nWhen calling `DefaultHttpHeaders.set` with an _iterator_ of values (as opposed to a single given value), header value validation was not performed, allowing malicious header values in the iterator to perform [HTTP Response Splitting](https://owasp.org/www-community/attacks/HTTP_Response_Splitting).\n\n### Patches\nThe necessary validation was added in Netty 4.1.86.Final.\n\n### Workarounds\nIntegrators can work around the issue by changing the `DefaultHttpHeaders.set(CharSequence, Iterator<?>)` call, into a `remove()` call, and call `add()` in a loop over the iterator of values.\n\n### References\n[HTTP Response Splitting](https://owasp.org/www-community/attacks/HTTP_Response_Splitting)\n[CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers](https://cwe.mitre.org/data/definitions/113.html)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [[example link to repo](https://github.com/netty/netty)](https://github.com/netty/netty)\n* Email us at [netty-security@googlegroups.com](mailto:netty-security@googlegroups.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.netty:netty-codec-http"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.83.Final"
}, {
"fixed" : "4.1.86.Final"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/netty/netty/security/advisories/GHSA-hh82-3pmq-7frp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41915"
}, {
"type" : "WEB",
"url" : "https://github.com/netty/netty/issues/13084"
}, {
"type" : "WEB",
"url" : "https://github.com/netty/netty/pull/12760"
}, {
"type" : "WEB",
"url" : "https://github.com/netty/netty/commit/c37c637f096e7be3dffd36edee3455c8e90cb1b0"
}, {
"type" : "WEB",
"url" : "https://github.com/netty/netty/commit/fe18adff1c2b333acb135ab779a3b9ba3295a1c4"
}, {
"type" : "WEB",
"url" : "https://github.com/netty/netty"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/01/msg00008.html"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20230113-0004"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2023/dsa-5316"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-113", "CWE-436" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-12T21:25:44Z",
"nvd_published_at" : "2022-12-13T07:15:00Z"
}
}