{"answers":{"affected":"7 open source packages ship an affected version, including tokio.","exploited":"There is no known exploitation of GHSA-4q83-7cq4-p6wg in the wild and no public exploit code.","fix":"Upgrade tokio to a fixed version for your release line: 1.18.5, 1.20.4 or 1.24.2.","what":"GHSA-4q83-7cq4-p6wg is an use after free vulnerability in tokio, published on 11 Jan 2023."},"fix_prompt":"Check this codebase for GHSA-4q83-7cq4-p6wg and fix it if it is affected.\n\nWhat it is: GHSA-4q83-7cq4-p6wg is an use after free vulnerability in tokio, published on 11 Jan 2023. \nExploitation: There is no known exploitation of GHSA-4q83-7cq4-p6wg in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tokio (crates.io): affected from 0.2.0; fixed in 1.18.5, 1.20.4, 1.24.2\n- tokio (crates.io): affected from 0.2.0; fixed in 1.18.5\n- tokio (crates.io): affected from 0.2.0; fixed in 1.18.5\n- tokio (crates.io): affected from 1.19.0; fixed in 1.20.4\n- tokio (crates.io): affected from 1.19.0; fixed in 1.20.4\n- tokio (crates.io): affected from 1.21.0; fixed in 1.24.2\n- tokio (crates.io): affected from 1.21.0; fixed in 1.24.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-4q83-7cq4-p6wg/ (Markdown: https://insights.sbomify.com/GHSA-4q83-7cq4-p6wg/index.md)","id":"GHSA-4q83-7cq4-p6wg","markdown":"https://insights.sbomify.com/GHSA-4q83-7cq4-p6wg/index.md","name":"GHSA-4q83-7cq4-p6wg","record":{"aliases":["RUSTSEC-2023-0005"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"unknown","non_default_config":true,"product_category":"Rust async runtime","requires_auth":"none","summary":"A soundness bug in Tokio's ReadHalf::unsplit can cause use-after-free if specific conditions are met, potentially allowing code execution.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"`tokio::io::ReadHalf\u003cT\u003e::unsplit` can violate the `Pin` contract\n\nThe soundness issue is described in the [tokio/issues#5372](https://github.com/tokio-rs/tokio/issues/5372)\n\nSpecific set of conditions needed to trigger an issue (a !Unpin type in ReadHalf)\nis unusual, combined with the difficulty of making any arbitrary use-after-free\nexploitable in Rust without doing a lot of careful alignment of data types in\nthe surrounding code.\n\nThe `tokio` feature `io-util` is also required to be enabled to trigger this\nsoundness issue.\n\nThanks to zachs18 reporting the issue to Tokio team responsibly and taiki-e\nand carllerche appropriately responding and fixing the soundness bug.\n\nTokio before 0.2.0 used `futures` 0.1 that did not have `Pin`, so it is not\naffected by this issue.","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"`tokio::io::ReadHalf\u003cT\u003e::unsplit` is Unsound","id":"GHSA-4q83-7cq4-p6wg","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"use_after_free","year":"2023"},"n_packages":7,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["1.18.5","1.20.4","1.24.2"],"introduced":["0.2.0","1.19.0","1.21.0"],"last_affected":[],"package":"tokio","purl":"pkg:cargo/tokio","source":"RUSTSEC-2023-0005"},{"ecosystem":"crates.io","fixed":["1.18.5"],"introduced":["0.2.0"],"last_affected":[],"package":"tokio","purl":null,"source":"GHSA-4q83-7cq4-p6wg"},{"ecosystem":"crates.io","fixed":["1.18.5"],"introduced":["0.2.0"],"last_affected":[],"package":"tokio","purl":"pkg:cargo/tokio","source":"GHSA-4q83-7cq4-p6wg"},{"ecosystem":"crates.io","fixed":["1.20.4"],"introduced":["1.19.0"],"last_affected":[],"package":"tokio","purl":null,"source":"GHSA-4q83-7cq4-p6wg"},{"ecosystem":"crates.io","fixed":["1.20.4"],"introduced":["1.19.0"],"last_affected":[],"package":"tokio","purl":"pkg:cargo/tokio","source":"GHSA-4q83-7cq4-p6wg"},{"ecosystem":"crates.io","fixed":["1.24.2"],"introduced":["1.21.0"],"last_affected":[],"package":"tokio","purl":null,"source":"GHSA-4q83-7cq4-p6wg"},{"ecosystem":"crates.io","fixed":["1.24.2"],"introduced":["1.21.0"],"last_affected":[],"package":"tokio","purl":"pkg:cargo/tokio","source":"GHSA-4q83-7cq4-p6wg"}],"products":null,"published":"2023-01-11","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A soundness bug in Tokio's ReadHalf::unsplit can cause use-after-free if specific conditions are met, potentially allowing code execution.","url":"https://insights.sbomify.com/GHSA-4q83-7cq4-p6wg/"}