{"answers":{"affected":"3 open source packages ship an affected version, including lexical.","exploited":"There is no known exploitation of GHSA-c2hm-mjxv-89r4 in the wild and no public exploit code.","fix":"Upgrade lexical to 7.0.0 or later.","what":"GHSA-c2hm-mjxv-89r4 is a memory corruption vulnerability in lexical, published on 3 Sep 2023."},"fix_prompt":"Check this codebase for GHSA-c2hm-mjxv-89r4 and fix it if it is affected.\n\nWhat it is: GHSA-c2hm-mjxv-89r4 is a memory corruption vulnerability in lexical, published on 3 Sep 2023. \nExploitation: There is no known exploitation of GHSA-c2hm-mjxv-89r4 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- lexical (crates.io): affected all versions; fixed in 7.0.0\n- lexical (crates.io): affected all versions; fixed in 7.0.0\n- lexical (crates.io): affected from 0.0.0-0; fixed in 7.0.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-c2hm-mjxv-89r4/ (Markdown: https://insights.sbomify.com/GHSA-c2hm-mjxv-89r4/index.md)","id":"GHSA-c2hm-mjxv-89r4","markdown":"https://insights.sbomify.com/GHSA-c2hm-mjxv-89r4/index.md","name":"GHSA-c2hm-mjxv-89r4","record":{"aliases":["RUSTSEC-2023-0055"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust lexical library","requires_auth":"none","summary":"The lexical Rust library contains soundness issues allowing memory corruption and potential code execution via invalid bit patterns or out-of-bounds iterator access.","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":"`lexical` contains multiple soundness issues:\n\n 1. [Bytes::read() allows creating instances of types with invalid bit patterns](https://github.com/Alexhuszagh/rust-lexical/issues/102)\n 1. [BytesIter::read() advances iterators out of bounds](https://github.com/Alexhuszagh/rust-lexical/issues/101)\n 1. [The `BytesIter` trait has safety invariants but is public and not marked `unsafe`](https://github.com/Alexhuszagh/rust-lexical/issues/104)\n 1. [`write_float()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine](https://github.com/Alexhuszagh/rust-lexical/issues/95)\n 1. [`radix()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine](https://github.com/Alexhuszagh/rust-lexical/issues/126)\n\nThe crate also has some correctness issues.\n\n## Alternatives\n\nFor quickly parsing floating-point numbers third-party crates are no longer needed. A fast float parsing algorithm by the author of `lexical` has been [merged](https://github.com/rust-lang/rust/pull/86761) into libcore.\n\nFor quickly parsing integers, consider `atoi` and `btoi` crates (100% safe code). `atoi_radix10` provides even faster parsing, but only with `-C target-cpu=native`, and at the cost of some `unsafe`.\n\nFor formatting integers in a `#[no_std]` context consider the [`numtoa`](https://crates.io/crates/numtoa) crate.\n\nFor working with big numbers consider `num-bigint` and `num-traits`.","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":"Multiple soundness issues","id":"GHSA-c2hm-mjxv-89r4","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":["7.0.0"],"introduced":["0"],"last_affected":[],"package":"lexical","purl":null,"source":"GHSA-c2hm-mjxv-89r4"},{"ecosystem":"crates.io","fixed":["7.0.0"],"introduced":["0"],"last_affected":[],"package":"lexical","purl":"pkg:cargo/lexical","source":"GHSA-c2hm-mjxv-89r4"},{"ecosystem":"crates.io","fixed":["7.0.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"lexical","purl":"pkg:cargo/lexical","source":"RUSTSEC-2023-0055"}],"products":null,"published":"2023-09-03","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":"The lexical Rust library contains soundness issues allowing memory corruption and potential code execution via invalid bit patterns or out-of-bounds iterator access.","url":"https://insights.sbomify.com/GHSA-c2hm-mjxv-89r4/"}