CVE-2023-6180: Tokio boring Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-pjrj-h4fg-6gm4
CVSS 5.3
CWE-400 CWE-404 CWE-401
Published
Advisory Summary

CVE-2023-6180 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Tokio boring libraries in the crates.io ecosystem. The issue involves tokio-boring vulnerable to resource exhaustion via memory leak. Remediation is available by upgrading affected packages to version 4.1.0.

CVE-2023-6180 at a Glance

CVE Identifier CVE-2023-6180
GHSA Identifier GHSA-pjrj-h4fg-6gm4
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Tokio boring
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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 Low (A:L)

How to Fix CVE-2023-6180

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

tokio-boring fixed: 4.1.0
Upgrade tokio-boring to 4.1.0
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 tokio-boring

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-6180, inspect your project dependencies for Tokio boring:

inspect dependencies for tokio-boring

Analyze the terminal output to locate any version of Tokio boring in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.0), 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 Tokio boring, 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 The tokio-boring library in version 4.0.0 is affected by a memory leak issue that can lead to excessive resource consumption and potential DoS by resource exhaustion. The `set_ex_data` function used by the library did not deallocate memory used by pre-existing data in memory each time after completing a TLS connection causing the program to consume more resources with each new connection. ### Patches The issue is fixed in version 4.1.0 of tokio-boring. ### References [CVE-2023-6180 at cve.org](https://www.cve.org/CVERecord?id=CVE-2023-6180)

CVE-2023-6180 Affected Tokio boring Versions

1 component(s)
Fixed Versions:
4.1.0
Product / Package Ecosystem Affected Versions Fixed Version
tokio-boring
crates.io
≥ 4.0.0
< 4.1.0
All 1 versions
4.0.0
4.1.0

References

Frequently Asked Questions

What is CVE-2023-6180?
CVE-2023-6180 is a security vulnerability in Tokio boring involving tokio-boring vulnerable to resource exhaustion via memory leak under CWE-400: Uncontrolled Resource Consumption.
Which Tokio boring versions are affected?
Affected versions include releases prior to 4.1.0 across affected packages: tokio-boring.
What version fixes CVE-2023-6180?
Upgrading to 4.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tokio-boring affected?
Yes, tokio-boring is affected in releases prior to 4.1.0. Upgrade your dependency to 4.1.0 or later.
What is the CVSS score of CVE-2023-6180?
CVE-2023-6180 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2023-6180?
CVE-2023-6180 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-2023-6180?
Run the dependency tree command: 'inspect dependencies for tokio-boring'. 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-pjrj-h4fg-6gm4",
  "modified" : "2023-12-05T23:42:49Z",
  "published" : "2023-12-05T23:42:49Z",
  "aliases" : [ "CVE-2023-6180" ],
  "summary" : "tokio-boring vulnerable to resource exhaustion via memory leak",
  "details" : "### Impact\nThe tokio-boring library in version 4.0.0 is affected by a memory leak issue that can lead to excessive resource consumption and potential DoS by resource exhaustion. The `set_ex_data` function used by the library did not deallocate memory used by pre-existing data in memory each time after completing a TLS connection causing the program to consume more resources with each new connection.\n\n### Patches\nThe issue is fixed in version 4.1.0 of tokio-boring.\n\n### References\n[CVE-2023-6180 at cve.org](https://www.cve.org/CVERecord?id=CVE-2023-6180)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "tokio-boring"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.0"
      } ]
    } ],
    "versions" : [ "4.0.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/boring/security/advisories/GHSA-pjrj-h4fg-6gm4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-6180"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/boring/commit/a32783374f2682e6949fdb713910b1b9f103d3ed"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudflare/boring"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-401", "CWE-404" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-05T23:42:49Z",
    "nvd_published_at" : "2023-12-05T15:15:08Z"
  }
}