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

Not scored Published

An attacker can cause a segmentation fault and application crash by providing an empty string to the fast-float2 library due to missing bounds checks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
Available

What is GHSA-jqcp-xc3v-f446?

GHSA-jqcp-xc3v-f446 is a memory corruption vulnerability in fast-float2, published on 13 Jan 2025.

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

Which versions are affected by GHSA-jqcp-xc3v-f446?

3 open source packages ship an affected version, including fast-float2.

PackageAffectedFixed in
fast-float2 crates.ioAll versions0.2.2
fast-float2 crates.ioAll versions0.2.2
fast-float2 crates.ioFrom 0.0.0-00.2.2

How do I fix GHSA-jqcp-xc3v-f446?

Upgrade fast-float2 to 0.2.2 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is GHSA-jqcp-xc3v-f446 being exploited?

There is no known exploitation of GHSA-jqcp-xc3v-f446 in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2025-0002.

Is GHSA-jqcp-xc3v-f446 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free