# GHSA-9hpw-r23r-xgm5: Data race in `Iter` and `IterMut`

- Severity: High (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2022-01-23T12:00:00.000Z
- Modified: 2023-11-08T04:17:57.540Z
- Also known as: RUSTSEC-2022-0006
- Weaknesses: CWE-362

## Description

In the affected version of this crate, `{Iter, IterMut}::next` used a weaker memory ordering when loading values than what was required, exposing a potential data race
when iterating over a `ThreadLocal`'s values.

Crates using `Iter::next`, or `IterMut::next` are affected by this issue.

(As written by GitHub Advisory Database.)

## Affected

- thread_local (crates.io): before 1.1.4; from 0.0.0-0 before 1.1.4

## References

- <https://github.com/Amanieu/thread_local-rs/issues/33> (report, web)
- <https://github.com/Amanieu/thread_local-rs> (package)
- <https://rustsec.org/advisories/RUSTSEC-2022-0006.html> (advisory, web)
- <https://crates.io/crates/thread_local> (package)

## Sources

- GitHub Advisory Database: [GHSA-9hpw-r23r-xgm5](https://github.com/advisories/GHSA-9hpw-r23r-xgm5), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2022-0006](https://rustsec.org/advisories/RUSTSEC-2022-0006.html), CC0-1.0, modified 2023-11-08

---

Page: https://cve.day/GHSA-9hpw-r23r-xgm5 · Whole record: https://cve.day/GHSA-9hpw-r23r-xgm5.json · Rebuilt by cve.day 2026-11-25T22:56:43.090Z
