CVE-2022-2047: Jetty http Jetty Invalid URI Parsing May Vulnerability

LOW
Advisory Identifier: GHSA-cj7v-27pg-wf7q
CVSS 2.7
CWE-20
Published
Advisory Summary

CVE-2022-2047 is a LOW (CVSS 2.7) jetty invalid uri parsing may vulnerability (CWE-20: Improper Input Validation) affecting Jetty http libraries in the Maven ecosystem. The issue involves jetty invalid uri parsing may produce invalid httpuri.authority. Remediation is available by upgrading affected packages to version 9.4.47, 10.0.10, 11.0.10.

CVE-2022-2047 at a Glance

CVE Identifier CVE-2022-2047
GHSA Identifier GHSA-cj7v-27pg-wf7q
Severity LOW
CVSS v3.1 Base Score 2.7
CWE Classification CWE-20: Improper Input Validation
Affected Product Jetty http
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 2.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2022-2047

To remediate this vulnerability, upgrade all affected Jetty 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.

org.eclipse.jetty:jetty-http fixed: 9.4.47
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-http</artifactId>
    <version>9.4.47</version>
</dependency>
org.eclipse.jetty:jetty-http fixed: 10.0.10
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-http</artifactId>
    <version>10.0.10</version>
</dependency>
org.eclipse.jetty:jetty-http fixed: 11.0.10
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-http</artifactId>
    <version>11.0.10</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=org.eclipse.jetty

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-2047, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.eclipse.jetty

Analyze the terminal output to locate any version of Jetty http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.4.47), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.eclipse.jetty 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Jetty 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

### Description URI use within Jetty's `HttpURI` class can parse invalid URIs such as `http://localhost;/path` as having an authority with a host of `localhost;`. A URIs of the type `http://localhost;/path` should be interpreted to be either invalid or as `localhost;` to be the userinfo and no host. However, `HttpURI.host` returns `localhost;` which is definitely wrong. ### Impact This can lead to errors with Jetty's `HttpClient`, and Jetty's `ProxyServlet` / `AsyncProxyServlet` / `AsyncMiddleManServlet` wrongly interpreting an authority with no host as one with a host. ### Patches Patched in PR [#8146](https://github.com/eclipse/jetty.project/pull/8146) for Jetty version 9.4.47. Patched in PR [#8014](https://github.com/eclipse/jetty.project/pull/8015) for Jetty versions 10.0.10, and 11.0.10 ### Workarounds None. ### For more information If you have any questions or comments about this advisory: * Email us at security@webtide.com.

CVE-2022-2047 Affected Jetty http Versions

3 component(s)
Fixed Versions:
9.4.4710.0.1011.0.10
Product / Package Ecosystem Affected Versions Fixed Version
org.eclipse.jetty:jetty-http
Maven
< 9.4.47
9.4.47
org.eclipse.jetty:jetty-http
Maven
≥ 10.0.0
< 10.0.10
10.0.10
org.eclipse.jetty:jetty-http
Maven
≥ 11.0.0
< 11.0.10
11.0.10

References

Frequently Asked Questions

What is CVE-2022-2047?
CVE-2022-2047 is a security vulnerability in Jetty http involving Jetty invalid URI parsing may produce invalid HttpURI.authority under CWE-20: Improper Input Validation.
Which Jetty http versions are affected?
Affected versions include releases prior to 9.4.47, 10.0.10, 11.0.10 across affected packages: org.eclipse.jetty:jetty-http.
What version fixes CVE-2022-2047?
Upgrading to 9.4.47, 10.0.10, 11.0.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jetty-http affected?
Yes, org.eclipse.jetty:jetty-http is affected in releases prior to 9.4.47, 10.0.10, 11.0.10. Upgrade your dependency to 9.4.47, 10.0.10, 11.0.10 or later.
What is the CVSS score of CVE-2022-2047?
CVE-2022-2047 has a CVSS v3.1 base score of 2.7 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2022-2047?
CVE-2022-2047 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2022-2047?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.eclipse.jetty'. 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-cj7v-27pg-wf7q",
  "modified" : "2022-07-19T19:42:17Z",
  "published" : "2022-07-07T20:55:34Z",
  "aliases" : [ "CVE-2022-2047" ],
  "summary" : "Jetty invalid URI parsing may produce invalid HttpURI.authority",
  "details" : "### Description\nURI use within Jetty's `HttpURI` class can parse invalid URIs such as `http://localhost;/path` as having an authority with a host of `localhost;`.\n\nA URIs of the type `http://localhost;/path` should be interpreted to be either invalid or as `localhost;` to be the userinfo and no host.\nHowever, `HttpURI.host` returns `localhost;` which is definitely wrong.\n\n### Impact\nThis can lead to errors with Jetty's `HttpClient`, and Jetty's `ProxyServlet` / `AsyncProxyServlet` / `AsyncMiddleManServlet` wrongly interpreting an authority with no host as one with a host.\n\n### Patches\nPatched in PR [#8146](https://github.com/eclipse/jetty.project/pull/8146) for Jetty version 9.4.47.\nPatched in PR [#8014](https://github.com/eclipse/jetty.project/pull/8015) for Jetty versions 10.0.10, and 11.0.10\n\n### Workarounds\nNone.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at security@webtide.com.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.jetty:jetty-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.4.47"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.jetty:jetty-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.0.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.jetty:jetty-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "11.0.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/eclipse/jetty.project/security/advisories/GHSA-cj7v-27pg-wf7q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-2047"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eclipse/jetty.project"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2022/08/msg00011.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20220901-0006"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2022/dsa-5198"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-07T20:55:34Z",
    "nvd_published_at" : "2022-07-07T21:15:00Z"
  }
}