{"id":"GHSA-48m6-wm5p-rr6h","aliases":["GHSA-48m6-wm5p-rr6h","RUSTSEC-2023-0070"],"related":[],"kind":"vulnerability","state":"published","title":"Insufficient covariance check makes self_cell unsound","summary":"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`.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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`.","format":"markdown","source":"ghsa"}],"published":"2023-11-10T12:00:00.000Z","modified":"2024-02-10T16:26:48.155Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.10.3"}],"ecosystem":"crates.io","package":"self_cell","purl":"pkg:cargo/self_cell","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.0.2"}],"ecosystem":"crates.io","package":"self_cell","purl":"pkg:cargo/self_cell","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.10.3"},{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.0.2"}],"ecosystem":"crates.io","package":"self_cell","purl":"pkg:cargo/self_cell","source":"rustsec"}],"references":[{"url":"https://github.com/Voultapher/self_cell/issues/49","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/Voultapher/self_cell","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0070.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/self_cell","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-48m6-wm5p-rr6h","url":"https://github.com/advisories/GHSA-48m6-wm5p-rr6h","licence":"CC-BY-4.0","modified":"2024-02-10T16:26:48.155Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2023-0070","url":"https://rustsec.org/advisories/RUSTSEC-2023-0070.html","licence":"CC0-1.0","modified":"2024-02-10T16:26:48.155Z"}],"updatedAt":"2026-11-25T22:56:43.161Z"}