{"answers":{"affected":"3 open source packages ship an affected version, including partial_sort.","exploited":"There is no known exploitation of GHSA-5x36-7567-3cw6 in the wild and no public exploit code.","fix":"Upgrade partial_sort to 0.2.0 or later.","what":"GHSA-5x36-7567-3cw6 is a memory corruption vulnerability in partial_sort, published on 20 Feb 2023."},"fix_prompt":"Check this codebase for GHSA-5x36-7567-3cw6 and fix it if it is affected.\n\nWhat it is: GHSA-5x36-7567-3cw6 is a memory corruption vulnerability in partial_sort, published on 20 Feb 2023. \nExploitation: There is no known exploitation of GHSA-5x36-7567-3cw6 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- partial_sort (crates.io): affected all versions; fixed in 0.2.0\n- partial_sort (crates.io): affected all versions; fixed in 0.2.0\n- partial_sort (crates.io): affected from 0.0.0-0; fixed in 0.2.0\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-5x36-7567-3cw6/ (Markdown: https://insights.sbomify.com/GHSA-5x36-7567-3cw6/index.md)","id":"GHSA-5x36-7567-3cw6","markdown":"https://insights.sbomify.com/GHSA-5x36-7567-3cw6/index.md","name":"GHSA-5x36-7567-3cw6","record":{"aliases":["RUSTSEC-2023-0016"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust sorting library","requires_auth":"none","summary":"Attackers can trigger out-of-bounds reads in release builds, potentially exposing sensitive memory contents.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Affected versions of this crate were using a debug assertion to validate the `last` parameter of `partial_sort()`. This would allow invalid inputs to cause an out-of-bounds read instead of immediately panicking, when compiled without debug assertions.\n\nAll writes are bounds-checked, so the out-of-bounds memory access is read-only. This also means that the first attempted out-of-bounds write will panic, limiting the possible reads.\n\nThe accessible region is further limited by an initial bounds-checked read at `(last / 2) - 1`, i.e., it is proportional to the size of the vector.\n\nThis bug has been fixed in v0.2.0.","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":"partial_sort contains Out-of-bounds Read in release mode","id":"GHSA-5x36-7567-3cw6","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2023"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.2.0"],"introduced":["0"],"last_affected":[],"package":"partial_sort","purl":null,"source":"GHSA-5x36-7567-3cw6"},{"ecosystem":"crates.io","fixed":["0.2.0"],"introduced":["0"],"last_affected":[],"package":"partial_sort","purl":"pkg:cargo/partial_sort","source":"GHSA-5x36-7567-3cw6"},{"ecosystem":"crates.io","fixed":["0.2.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"partial_sort","purl":"pkg:cargo/partial_sort","source":"RUSTSEC-2023-0016"}],"products":null,"published":"2023-02-20","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":"Attackers can trigger out-of-bounds reads in release builds, potentially exposing sensitive memory contents.","url":"https://insights.sbomify.com/GHSA-5x36-7567-3cw6/"}