Every CVE Search/ Get API key

CVE-2021-45704

AtomicBucket<T> unconditionally implements Send/Sync

8.1 HighFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.77%Up 0.3 points since Dec 27, 2021
90%50%10%1%

What each source reports

NVD Score used 8.1

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.

Record
CVE-2021-45704
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-362, CWE-787
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2021-45704
Updated
2026-11-02
EUVDEUVD-2022-0570 No score

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.

Record
EUVD-2022-0570
Updated
2026-11-03
GitHub AdvisoriesGHSA-cwvc-87xq-pc5m 8.1

Out-of-bounds Write and Race Condition in metrics-util

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.

The 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>).

Record
GHSA-cwvc-87xq-pc5m
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-362, CWE-787
Updated
2026-11-02
GitHub AdvisoriesGHSA-3hxh-7jxm-59x4 No score

AtomicBucket<T> unconditionally implements Send/Sync

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.

The 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>).

Record
GHSA-3hxh-7jxm-59x4
Updated
2026-11-02
OSVGHSA-cwvc-87xq-pc5m 8.1

Out-of-bounds Write and Race Condition in metrics-util

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.

The 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>).

Record
GHSA-cwvc-87xq-pc5m
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-362, CWE-787
Updated
2026-11-02
OSVGHSA-3hxh-7jxm-59x4 No score

AtomicBucket<T> unconditionally implements Send/Sync

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.

The 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>).

Record
GHSA-3hxh-7jxm-59x4
Updated
2026-11-02
OSVRUSTSEC-2021-0113 No score

AtomicBucket<T> unconditionally implements Send/Sync

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.

The 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>).

Record
RUSTSEC-2021-0113
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
metrics-util
crates.io
before 0.7.0
0.7.0
metrics-util
crates.io
0.0.0-0 up to 0.7.0
0.7.0

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-45704 is a high vulnerability (CVSS 8.1) in Metrics-util Project Metrics-util, published April 7, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.77%, the 55th percentile. Fixed in metrics-util 0.7.0.

References

MoveEnter Open