# CVE-2021-38191: RUSTSEC-2021-0072 - Task dropped in wrong thread when aborting `LocalSet` task

Source: https://junglewise.ai/threats/cve-2021-38191-race-condition-in-tokio  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-07-07  
License: CC BY 4.0 with a link back

CVE-2021-38191 · Severity: low · CVSS 3.1 · Published 2021-07-07

Task dropped in wrong thread when aborting `LocalSet` task

Technologies: [tokio (crates.io)](https://junglewise.ai/threats/technologies/tokio). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2021-38191 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-38191 being exploited in the wild.

**How severe is CVE-2021-38191?** Low severity, with a CVSS score of 3.1, published 7 July 2021.

**Which products and versions are affected?** tokio (crates.io) SEMVER:introduced=0.3.0,fixed=1.5.1,introduced=1.6.0,fixed=1.6.3,introduced=1.7.0,fixed=1.7.2,introduced=1.8.0,fixed=1.8.1, SEMVER:introduced=1.8.0,fixed=1.8.1.

**Is there a fix for CVE-2021-38191?** Yes. tokio (crates.io): upgrade to 1.8.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-38191?** Check whether you run tokio (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tokio (crates.io): upgrade to 1.8.1 or later

  ```sh
  cargo update -p tokio
  ```


## Affected products

- tokio (crates.io) SEMVER:introduced=0.3.0,fixed=1.5.1,introduced=1.6.0,fixed=1.6.3,introduced=1.7.0,fixed=1.7.2,introduced=1.8.0,fixed=1.8.1, SEMVER:introduced=1.8.0,fixed=1.8.1

## Identifiers

- CVE-2021-38191
- GHSA-2grh-hm3w-w7hv
- RUSTSEC-2021-0072

## Related threats

- [Tokio race condition in time driver use-after-free](https://junglewise.ai/threats/cve-2026-115567-tokio-is-a-runtime-for-writing-applications-with-rust-in-1-54-0)
- [Tokio race condition in Interval time driver](https://junglewise.ai/threats/rustsec-2026-0384-race-condition-in-tokio-time-interval-on-tokio-v1-54-c6906742)
- [tokio AsyncFd constructors violate I/O safety](https://junglewise.ai/threats/rustsec-2026-0386-asyncfd-new-and-related-constructors-violate-i-o-5c953f63)
- [Tokio broadcast channel calls clone in parallel, but does not require `Sync`](https://junglewise.ai/threats/tokio-broadcast-channel-calls-clone-in-parallel-but-does-not-require-7d58a702)
- [RUSTSEC-2025-0023 - Broadcast channel calls clone in parallel, but does not require `Sync`](https://junglewise.ai/threats/rustsec-2025-0023-broadcast-channel-calls-clone-in-parallel-but-does-22da8233)
