Vulnerability DatabaseGHSA-8655-xgh5-5vvq

GHSA-8655-xgh5-5vvq
Rust vulnerability analysis and mitigation

Overview

The fast-float Rust crate contains a segmentation fault vulnerability (GHSA-8655-xgh5-5vvq) due to lack of bound checking in the AsciiStr struct. The vulnerability affects versions <= 0.2.0 of the package and was discovered and reported on October 13, 2024, with the advisory being published on January 29, 2025. The issue specifically resides in the fast_float::common::AsciiStr::first method (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from the first method within the AsciiStr struct using the unsafe keyword to read from memory without performing bounds checking. The method directly dereferences a pointer offset by self.ptr without validating the input buffer size. When an empty string is provided as input, the method attempts to access an invalid memory address, leading to undefined behavior and potential segmentation faults (GitHub Issue).

Impact

When exploited, this vulnerability can lead to invalid memory access and segmentation faults when processing empty buffers. The issue violates Rust's memory safety guarantees and can potentially cause program crashes or undefined behavior in applications using the affected versions of the fast-float crate (RustSec Advisory).

Mitigation and workarounds

While no patched version has been released for the original fast-float crate, a patch is available in the fast-float2 fork. The recommended fix involves implementing proper input validation in the first method to safely handle empty structs, or changing the method to return an Option type and moving the empty check to ensure local safety invariants (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management