GHSA-48m6-wm5p-rr6h: Self cell Insufficient Covariance Check Makes Self_cell Vulnerability

HIGH
Published
Advisory Summary

GHSA-48m6-wm5p-rr6h is a HIGH insufficient covariance check makes self_cell vulnerability (General Security Weakness) affecting Self cell libraries in the crates.io ecosystem. The issue involves insufficient covariance check makes self_cell unsound. Remediation is available by upgrading affected packages to version 0.10.3, 1.0.2.

GHSA-48m6-wm5p-rr6h at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-48m6-wm5p-rr6h
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Self cell
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-48m6-wm5p-rr6h

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

self_cell fixed: 0.10.3
Upgrade self_cell to 0.10.3
self_cell fixed: 1.0.2
Upgrade self_cell to 1.0.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 self_cell

How to Check if You Are Affected

To determine whether your application is affected by GHSA-48m6-wm5p-rr6h, inspect your project dependencies for Self cell:

inspect dependencies for self_cell

Analyze the terminal output to locate any version of Self cell in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.3), 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 General Security Weakness. In Self cell, 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

All public versions prior to `1.02` used an insufficient check to ensure that users correctly marked the dependent type as either `covariant` or `not_covariant`. This allowed users to mark a dependent as covariant even though its type was not covariant but invariant, for certain invariant types involving trait object lifetimes. One example for such a dependent type is `type Dependent<'a> = RefCell<Box<dyn fmt::Display + 'a>>`. Such a type allowed unsound usage in purely safe user code that leads to undefined behavior. The patched versions now produce a compile time error if such a type is marked as `covariant`.

GHSA-48m6-wm5p-rr6h Affected Self cell Versions

2 component(s)
Fixed Versions:
0.10.31.0.2
Product / Package Ecosystem Affected Versions Fixed Version
self_cell
crates.io
< 0.10.3
0.10.3
self_cell
crates.io
≥ 1.0.0
< 1.0.2
1.0.2

References

Frequently Asked Questions

What is GHSA-48m6-wm5p-rr6h?
GHSA-48m6-wm5p-rr6h is a security vulnerability in Self cell involving Insufficient covariance check makes self_cell unsound under General Security Weakness.
Which Self cell versions are affected?
Affected versions include releases prior to 0.10.3, 1.0.2 across affected packages: self_cell.
What version fixes GHSA-48m6-wm5p-rr6h?
Upgrading to 0.10.3, 1.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is self_cell affected?
Yes, self_cell is affected in releases prior to 0.10.3, 1.0.2. Upgrade your dependency to 0.10.3, 1.0.2 or later.
What CWE is associated with GHSA-48m6-wm5p-rr6h?
GHSA-48m6-wm5p-rr6h is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-48m6-wm5p-rr6h?
Run the dependency tree command: 'inspect dependencies for self_cell'. 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-48m6-wm5p-rr6h",
  "modified" : "2023-11-14T18:32:20Z",
  "published" : "2023-11-14T18:32:20Z",
  "aliases" : [ ],
  "summary" : "Insufficient covariance check makes self_cell unsound",
  "details" : "All public versions prior to `1.02` used an insufficient check to ensure that users correctly marked the dependent type as either `covariant` or `not_covariant`. This allowed users to mark a dependent as covariant even though its type was not covariant but invariant, for certain invariant types involving trait object lifetimes. One example for such a dependent type is `type Dependent<'a> = RefCell<Box<dyn fmt::Display + 'a>>`. Such a type allowed unsound usage in purely safe user code that leads to undefined behavior. The patched versions now produce a compile time error if such a type is marked as `covariant`.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "self_cell"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "self_cell"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Voultapher/self_cell/issues/49"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Voultapher/self_cell"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0070.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-14T18:32:20Z",
    "nvd_published_at" : null
  }
}