CVE-2022-39294: Conduit hyper Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-9398-5ghf-7pr6
CVSS 7.5
CWE-400 CWE-1284
Published
Advisory Summary

CVE-2022-39294 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Conduit hyper libraries in the crates.io ecosystem. The issue involves conduit-hyper vulnerable to denial of service from unchecked request length. Remediation is available by upgrading affected packages to version 0.4.2.

CVE-2022-39294 at a Glance

CVE Identifier CVE-2022-39294
GHSA Identifier GHSA-9398-5ghf-7pr6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Conduit hyper
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2022-39294

To remediate this vulnerability, upgrade all affected Conduit hyper dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

conduit-hyper fixed: 0.4.2
Upgrade conduit-hyper to 0.4.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for conduit-hyper

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-39294, inspect your project dependencies for Conduit hyper:

inspect dependencies for conduit-hyper

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

Note: Verify declared build manifests and deployed runtime container environments.

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 Conduit hyper, 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

Prior to version 0.4.2, `conduit-hyper` did not check any limit on a request's length before calling [`hyper::body::to_bytes`](https://docs.rs/hyper/latest/hyper/body/fn.to_bytes.html). An attacker could send a malicious request with an abnormally large `Content-Length`, which could lead to a panic if memory allocation failed for that request. In version 0.4.2, `conduit-hyper` sets an internal limit of 128 MiB per request, otherwise returning status 400 ("Bad Request"). This crate is part of the implementation of Rust's [crates.io](https://crates.io/), but that service is not affected due to its existing cloud infrastructure, which already drops such malicious requests. Even with the new limit in place, `conduit-hyper` is not recommended for production use, nor to directly serve the public Internet. The vulnerability was discovered by Ori Hollander from the JFrog Security Research team.

CVE-2022-39294 Affected Conduit hyper Versions

1 component(s)
Fixed Versions:
0.4.2
Product / Package Ecosystem Affected Versions Fixed Version
conduit-hyper
crates.io
≥ 0.2.0-alpha.3
< 0.4.2
0.4.2

References

Frequently Asked Questions

What is CVE-2022-39294?
CVE-2022-39294 is a security vulnerability in Conduit hyper involving conduit-hyper vulnerable to Denial of Service from unchecked request length under CWE-400: Uncontrolled Resource Consumption.
Which Conduit hyper versions are affected?
Affected versions include releases prior to 0.4.2 across affected packages: conduit-hyper.
What version fixes CVE-2022-39294?
Upgrading to 0.4.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is conduit-hyper affected?
Yes, conduit-hyper is affected in releases prior to 0.4.2. Upgrade your dependency to 0.4.2 or later.
What is the CVSS score of CVE-2022-39294?
CVE-2022-39294 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-39294?
CVE-2022-39294 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check crates.io dependencies for CVE-2022-39294?
Run the dependency tree command: 'inspect dependencies for conduit-hyper'. 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-9398-5ghf-7pr6",
  "modified" : "2022-10-31T18:44:47Z",
  "published" : "2022-10-31T18:44:47Z",
  "aliases" : [ "CVE-2022-39294" ],
  "summary" : "conduit-hyper vulnerable to Denial of Service from unchecked request length",
  "details" : "Prior to version 0.4.2, `conduit-hyper` did not check any limit on a request's length before calling [`hyper::body::to_bytes`](https://docs.rs/hyper/latest/hyper/body/fn.to_bytes.html). An attacker could send a malicious request with an abnormally large `Content-Length`, which could lead to a panic if memory allocation failed for that request.\n\nIn version 0.4.2, `conduit-hyper` sets an internal limit of 128 MiB per request, otherwise returning status 400 (\"Bad Request\").\n\nThis crate is part of the implementation of Rust's [crates.io](https://crates.io/), but that service is not affected due to its existing cloud infrastructure, which already drops such malicious requests. Even with the new limit in place, `conduit-hyper` is not recommended for production use, nor to directly serve the public Internet.\n\nThe vulnerability was discovered by Ori Hollander from the JFrog Security Research team.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "conduit-hyper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.0-alpha.3"
      }, {
        "fixed" : "0.4.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/conduit-rust/conduit-hyper/security/advisories/GHSA-9398-5ghf-7pr6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39294"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/conduit-rust/conduit-hyper/commit/4d225a53206505d39438ec6694e15f49c038baff"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/conduit-rust/conduit-hyper"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0066.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1284", "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-31T18:44:47Z",
    "nvd_published_at" : "2022-10-31T19:15:00Z"
  }
}