{"id":"CVE-2021-38191","aliases":["EUVD-2021-1512","GHSA-2grh-hm3w-w7hv","RUSTSEC-2021-0072","openSUSE-SU-2024:11751-1"],"status":"published","title":"Race condition in tokio","description":"An issue was discovered in the tokio crate before 1.8.1 for Rust. Upon a JoinHandle::abort, a Task may be dropped in the wrong thread.","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.00833,"percentile":0.57953,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-362","CWE-366"],"published":"2021-07-07T12:00:00Z","modified":"2026-10-24T10:31:02Z","fixes":[{"ecosystem":"crates.io","package":"tokio","fixed_in":["1.8.1","1.7.2","1.6.3","1.5.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.8.0"},{"fixed":"1.8.1"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.7.0"},{"fixed":"1.7.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.6.0"},{"fixed":"1.6.3"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.3.0"},{"fixed":"1.5.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"1.8.0"},{"fixed":"1.8.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"1.7.0"},{"fixed":"1.7.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"1.6.0"},{"fixed":"1.6.3"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.0"},{"fixed":"1.5.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"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"}]}]}],"products":[{"vendor":"tokio","product":"tokio"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0072.html","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","fix","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/tokio/RUSTSEC-2021-0072.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-38191","tags":["advisory"]},{"url":"https://github.com/tokio-rs/tokio/issues/3929","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-2grh-hm3w-w7hv"},{"url":"https://github.com/tokio-rs/tokio","tags":["package"]},{"url":"https://crates.io/crates/tokio","tags":["package"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2020-35905","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2020-36465","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-27378","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-32714","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-32715","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-38191","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-45710","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-38191","description":"An issue was discovered in the tokio crate before 1.8.1 for Rust. Upon a JoinHandle::abort, a Task may be dropped in the wrong thread.","status":"published","published":"2021-08-08T05:09:27Z","modified":"2024-08-04T01:37:16.274Z","updated_at":"2026-11-02T14:33:07.349244Z"}],"euvd":[{"id":"EUVD-2021-1512","description":"An issue was discovered in the tokio crate before 1.8.1 for Rust. Upon a JoinHandle::abort, a Task may be dropped in the wrong thread.","status":"published","published":"2021-08-08T05:09:27Z","modified":"2024-08-04T01:37:16Z","updated_at":"2026-11-03T03:24:25.244479Z"}],"ghsa":[{"id":"GHSA-2grh-hm3w-w7hv","title":"Race condition in tokio","description":"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.","status":"published","published":"2021-08-25T20:55:51Z","modified":"2023-06-22T05:03:25Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-362","CWE-366"],"updated_at":"2026-11-02T14:36:55.184601Z"}],"nvd":[{"id":"CVE-2021-38191","description":"An issue was discovered in the tokio crate before 1.8.1 for Rust. Upon a JoinHandle::abort, a Task may be dropped in the wrong thread.","status":"published","published":"2021-08-08T06:15:08.967Z","modified":"2026-06-17T04:01:43.753Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-362"],"updated_at":"2026-11-02T14:06:56.562207Z"}],"osv":[{"id":"CVE-2021-38191","description":"An issue was discovered in the tokio crate before 1.8.1 for Rust. Upon a JoinHandle::abort, a Task may be dropped in the wrong thread.","status":"published","published":"2021-08-08T06:15:08.967Z","modified":"2026-10-24T10:31:02.168399279Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:20.843843Z"},{"id":"GHSA-2grh-hm3w-w7hv","title":"Race condition in tokio","description":"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.","status":"published","published":"2021-08-25T20:55:51Z","modified":"2023-11-08T04:06:25.982475Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-362","CWE-366"],"updated_at":"2026-11-02T15:46:34.338541Z"},{"id":"openSUSE-SU-2024:11751-1","title":"afterburn-5.0.0-6.1 on GA media","description":"These are all security issues fixed in the afterburn-5.0.0-6.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:42:02.541488Z","updated_at":"2026-11-02T16:58:35.195147Z"},{"id":"RUSTSEC-2021-0072","title":"Task dropped in wrong thread when aborting `LocalSet` task","description":"When aborting a task with `JoinHandle::abort`, the future is dropped in the\nthread calling abort if the task is not currently being executed. This is\nincorrect for tasks spawned on a `LocalSet`.\n\nThis can easily result in race conditions as many projects use `Rc` or `RefCell`\nin their Tokio tasks for better performance.\n\nSee [tokio#3929][issue] for more details.\n\n[issue]: https://github.com/tokio-rs/tokio/issues/3929","status":"published","published":"2021-07-07T12:00:00Z","modified":"2023-11-08T04:06:25.982475Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
