# RUSTSEC-2025-0002: Segmentation fault due to lack of bound check

- Database: RustSec
- Published: 2025-01-13
- Modified: 2025-10-28

## Also published as

- [GHSA-JQCP-XC3V-F446](https://cve.now/GHSA-JQCP-XC3V-F446.md) (GitHub)

## Affected versions

- fast-float2 (crates.io): fixed in 0.2.2

## 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.

## References

- https://crates.io/crates/fast-float2
- https://rustsec.org/advisories/RUSTSEC-2025-0002.html
- https://github.com/aldanor/fast-float-rust/issues/38

Page: https://cve.now/RUSTSEC-2025-0002

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
