{"id":"CVE-2021-38191","aliases":["GHSA-2grh-hm3w-w7hv","RUSTSEC-2021-0072"],"url":"https://o3.security/vulnerability/CVE-2021-38191","summary":"Race condition in tokio","details":"When aborting a task with JoinHandle::abort, the future is dropped in the thread calling abort if the task is not currently being executed. This is incorrect for tasks spawned on a LocalSet. This can easily result in race conditions as many projects use Rc or RefCell in their Tokio tasks for better performance.","published":"2021-08-08T06:15:08.967Z","modified":"2026-07-09T00:21:03.087472Z","cvss":{"score":5.9,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"crates.io","name":"tokio","fixedVersion":"1.8.1"},{"ecosystem":"crates.io","name":"tokio","fixedVersion":"1.7.2"},{"ecosystem":"crates.io","name":"tokio","fixedVersion":"1.6.3"},{"ecosystem":"crates.io","name":"tokio","fixedVersion":"1.5.1"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/tokio/RUSTSEC-2021-0072.md"},{"type":"FIX","url":"https://rustsec.org/advisories/RUSTSEC-2021-0072.html"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-38191"},{"type":"WEB","url":"https://github.com/tokio-rs/tokio/issues/3929"},{"type":"PACKAGE","url":"https://github.com/tokio-rs/tokio"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-09T00:21:03.087472Z"}}