CVE-2022-41915: Netty codec http Netty Vulnerable To HTTP Response Vulnerability

MODERATE
Advisory Identifier: GHSA-hh82-3pmq-7frp
CVSS 6.5
CWE-113 CWE-436
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2022-41915
GHSA Identifier GHSA-hh82-3pmq-7frp
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
Affected Product Netty codec http
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

io.netty:netty-codec-http fixed: 4.1.86.Final
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-codec-http</artifactId>
    <version>4.1.86.Final</version>
</dependency>
Verify Direct and Transitive Dependencies

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

### Impact When 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). ### Patches The necessary validation was added in Netty 4.1.86.Final. ### Workarounds Integrators 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. ### References [HTTP Response Splitting](https://owasp.org/www-community/attacks/HTTP_Response_Splitting) [CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers](https://cwe.mitre.org/data/definitions/113.html) ### For more information If you have any questions or comments about this advisory: * Open an issue in [[example link to repo](https://github.com/netty/netty)](https://github.com/netty/netty) * Email us at [netty-security@googlegroups.com](mailto:netty-security@googlegroups.com)

CVE-2022-41915 Affected Netty codec http Versions

1 component(s)
Fixed Versions:
4.1.86.Final
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?
CVE-2022-41915 is a security vulnerability in Netty codec http involving Netty vulnerable to HTTP Response splitting from assigning header value iterator under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting').
Which Netty codec http versions are affected?
Affected versions include releases prior to 4.1.86.Final across affected packages: io.netty:netty-codec-http.
What version fixes CVE-2022-41915?
Upgrading to 4.1.86.Final (or the latest patched release for your respective branch) resolves the vulnerability.
Is netty-codec-http affected?
Yes, io.netty:netty-codec-http is affected in releases prior to 4.1.86.Final. Upgrade your dependency to 4.1.86.Final or later.
What is the CVSS score of CVE-2022-41915?
CVE-2022-41915 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2022-41915?
CVE-2022-41915 is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') (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.).
How can I check Maven dependencies for CVE-2022-41915?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=io.netty'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}