Rust advisories / fast-float2
Vulnerability MediumRUSTSEC-2025-0002 · fast-float2
RUSTSEC-2025-0002: Segmentation fault due to lack of bound check
Short answerA security vulnerability in the fast-float2 crate: Segmentation fault due to lack of bound check. GitHub rates it Medium. Fixed in 0.2.2: update to a fixed version.
| Crate | fast-float2 |
|---|---|
| Type | Vulnerability (memory-exposure) |
| Affected versions | Before 0.2.2. |
| Fixed in | 0.2.2 |
| Severity | Medium (GitHub rating) |
| Published | 2025-01-13 |
| Last changed | 2025-10-28 |
| Also known as | GHSA-jqcp-xc3v-f446 |
| Affected functions | fast_float2::common::AsciiStr::first |
What to do
- See which version you have:
cargo tree -i fast-float2(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p fast-float2. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplefast-float2 = "0.2.2") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
In this case, the "fast_float2::common::AsciiStr::first" method within the "AsciiStr" struct uses the unsafe keyword to reading from memory without performing bounds checking. Specifically, it directly dereferences a pointer offset by "self.ptr". Because of the above reason, the method accesses invalid memory address when it takes an empty string as its input. This approach violates Rust’s memory safety guarantees, as it can lead to invalid memory access if empty buffer is provided.
References
- Package: crates.io/crates/fast-float2
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0002.html
- Report: github.com/aldanor/fast-float-rust/issues/38
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?