GHSA-fh2r-99q2-6mmg: rustls-webpki Denial of Service Vulnerability

HIGH
CVSS 7.5
CWE-400
Published
Advisory Summary

GHSA-fh2r-99q2-6mmg is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting rustls-webpki libraries in the crates.io ecosystem. The issue involves cpu denial of service in certificate path building. Remediation is available by upgrading affected packages to version 0.100.2, 0.101.4.

GHSA-fh2r-99q2-6mmg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-fh2r-99q2-6mmg
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product rustls-webpki
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.0/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 GHSA-fh2r-99q2-6mmg

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

rustls-webpki fixed: 0.100.2
Upgrade rustls-webpki to 0.100.2
rustls-webpki fixed: 0.101.4
Upgrade rustls-webpki to 0.101.4
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 rustls-webpki

How to Check if You Are Affected

To determine whether your application is affected by GHSA-fh2r-99q2-6mmg, inspect your project dependencies for rustls-webpki:

inspect dependencies for rustls-webpki

Analyze the terminal output to locate any version of rustls-webpki in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.100.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 rustls-webpki, 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

When this crate is given a pathological certificate chain to validate, it will spend CPU time exponential with the number of candidate certificates at each step of path building. Both TLS clients and TLS servers that accept client certificate are affected. We now give each path building operation a budget of 100 signature verifications. The original `webpki` crate is also affected, see [GHSA-8qv2-5vq6-g2g7](https://github.com/advisories/GHSA-8qv2-5vq6-g2g7). This was previously reported in the original crate <https://github.com/briansmith/webpki/issues/69> and re-reported to us recently.

GHSA-fh2r-99q2-6mmg Affected rustls-webpki Versions

2 component(s)
Fixed Versions:
0.100.20.101.4
Product / Package Ecosystem Affected Versions Fixed Version
rustls-webpki
crates.io
< 0.100.2
0.100.2
rustls-webpki
crates.io
≥ 0.101.0
< 0.101.4
0.101.4

References

Frequently Asked Questions

What is GHSA-fh2r-99q2-6mmg?
GHSA-fh2r-99q2-6mmg is a security vulnerability in rustls-webpki involving CPU denial of service in certificate path building under CWE-400: Uncontrolled Resource Consumption.
Which rustls-webpki versions are affected?
Affected versions include releases prior to 0.100.2, 0.101.4 across affected packages: rustls-webpki.
What version fixes GHSA-fh2r-99q2-6mmg?
Upgrading to 0.100.2, 0.101.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rustls-webpki affected?
Yes, rustls-webpki is affected in releases prior to 0.100.2, 0.101.4. Upgrade your dependency to 0.100.2, 0.101.4 or later.
What is the CVSS score of GHSA-fh2r-99q2-6mmg?
GHSA-fh2r-99q2-6mmg has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-fh2r-99q2-6mmg?
GHSA-fh2r-99q2-6mmg 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 GHSA-fh2r-99q2-6mmg?
Run the dependency tree command: 'inspect dependencies for rustls-webpki'. 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-fh2r-99q2-6mmg",
  "modified" : "2023-09-19T22:28:38Z",
  "published" : "2023-08-22T18:06:15Z",
  "aliases" : [ ],
  "summary" : "rustls-webpki: CPU denial of service in certificate path building",
  "details" : "When this crate is given a pathological certificate chain to validate, it will spend CPU time exponential with the number of candidate certificates at each step of path building.\n\nBoth TLS clients and TLS servers that accept client certificate are affected.\n\nWe now give each path building operation a budget of 100 signature verifications.\n\nThe original `webpki` crate is also affected, see [GHSA-8qv2-5vq6-g2g7](https://github.com/advisories/GHSA-8qv2-5vq6-g2g7).\n\nThis was previously reported in the original crate <https://github.com/briansmith/webpki/issues/69> and re-reported to us recently.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "rustls-webpki"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.100.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "rustls-webpki"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.101.0"
      }, {
        "fixed" : "0.101.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rustls/webpki/commit/4ea052366f342a06344aab589565179b59b342d3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rustls/webpki/commit/dcad2406c92169b72c110dd12183fcc74035b683"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-8qv2-5vq6-g2g7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rustls/webpki"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0053.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-22T18:06:15Z",
    "nvd_published_at" : null
  }
}