{"id":"CVE-2021-45704","aliases":["CVE-2021-45704","GHSA-3hxh-7jxm-59x4","GHSA-cwvc-87xq-pc5m","RUSTSEC-2021-0113"],"related":[],"kind":"vulnerability","state":"published","title":"AtomicBucket<T> unconditionally implements Send/Sync","summary":"An issue was discovered in the metrics-util crate before 0.7.0 for Rust. There is a data race and memory corruption because AtomicBucket<T> unconditionally implements the Send and Sync traits.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the metrics-util crate before 0.7.0 for Rust. There is a data race and memory corruption because AtomicBucket<T> unconditionally implements the Send and Sync traits.","source":"cvelist"},{"lang":"en","text":"In the affected versions of the crate, `AtomicBucket<T>` unconditionally implements `Send`/`Sync` traits. Therefore, users can create a data race to the inner\n`T: !Sync` by using the `AtomicBucket::data_with()` API.\nSuch data races can potentially cause memory corruption or other undefined behavior.\n\nThe flaw was fixed in commit 8e6daab by adding appropriate Send/Sync bounds to the Send/Sync impl of struct `Block<T>` (which is a data type contained inside `AtomicBucket<T>`).","format":"markdown","source":"ghsa"},{"lang":"en","text":"In the affected versions of the crate, AtomicBucket<T> unconditionally implements Send/Sync traits. Therefore, users can create a data race to the inner T: !Sync by using the AtomicBucket::data_with() API. Such data races can potentially cause memory corruption or other undefined behavior.\n\nThe flaw was fixed in commit 8e6daab by adding appropriate Send/Sync bounds to the Send/Sync impl of struct Block<T> (which is a data type contained inside AtomicBucket<T>).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se ha detectado un problema en la crate metrics-util versiones anteriores a 0.7.0 para Rust. Se presenta una carrera de datos y corrupción de memoria porque AtomicBucket(T) implementa incondicionalmente los rasgos Send y Sync","source":"nvd"}],"published":"2021-04-07T12:00:00.000Z","modified":"2026-06-17T04:13:59.030Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-362","CWE-787"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.7.0"}],"ecosystem":"crates.io","package":"metrics-util","purl":"pkg:cargo/metrics-util","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.7.0"}],"ecosystem":"crates.io","package":"metrics-util","purl":"pkg:cargo/metrics-util","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.7.0"}],"ecosystem":"crates.io","package":"metrics-util","purl":"pkg:cargo/metrics-util","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.7.0"}],"vendor":"metrics-util_project","product":"metrics-util","cpe":"cpe:2.3:a:metrics-util_project:metrics-util:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0113.html","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/metrics-util/RUSTSEC-2021-0113.md","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/metrics-rs/metrics/issues/190","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/metrics-rs/metrics","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45704","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/metrics-rs/metrics/commit/8e6daab","tags":["web"],"sources":["ghsa"]},{"url":"https://crates.io/crates/metrics-util","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-45704","url":"https://www.cve.org/CVERecord?id=CVE-2021-45704","licence":"CVE Terms of Use","modified":"2024-08-04T04:47:02.020Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3hxh-7jxm-59x4","url":"https://github.com/advisories/GHSA-3hxh-7jxm-59x4","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:22.868Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cwvc-87xq-pc5m","url":"https://github.com/advisories/GHSA-cwvc-87xq-pc5m","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:22.868Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0113","url":"https://rustsec.org/advisories/RUSTSEC-2021-0113.html","licence":"CC0-1.0","modified":"2023-11-08T04:07:22.868Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-45704","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45704","licence":"Public domain","modified":"2026-06-17T04:13:59.030Z"}],"updatedAt":"2026-11-25T22:58:06.269Z","epss":{"score":0.00766,"percentile":0.5668,"date":"2026-12-01T12:00:22.000Z"}}