# GHSA-jqcp-xc3v-f446: fast-float2 has a segmentation fault due to lack of bound check

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-01-13T12:00:00.000Z
- Modified: 2025-10-28T06:29:25.294Z
- Also known as: RUSTSEC-2025-0002

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- fast-float2 (crates.io): before 0.2.2; from 0.0.0-0 before 0.2.2

## References

- <https://github.com/aldanor/fast-float-rust/issues/38> (report, web)
- <https://github.com/Alexhuszagh/fast-float-rust/pull/7> (web)
- <https://github.com/Alexhuszagh/fast-float-rust> (package)
- <https://rustsec.org/advisories/RUSTSEC-2025-0002.html> (advisory, web)
- <https://crates.io/crates/fast-float2> (package)

## Sources

- GitHub Advisory Database: [GHSA-jqcp-xc3v-f446](https://github.com/advisories/GHSA-jqcp-xc3v-f446), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2025-0002](https://rustsec.org/advisories/RUSTSEC-2025-0002.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-jqcp-xc3v-f446 · Whole record: https://cve.day/GHSA-jqcp-xc3v-f446.json · Rebuilt by cve.day 2026-11-25T22:56:43.244Z
