RUSTSEC-2025-0003

Source
https://rustsec.org/advisories/RUSTSEC-2025-0003
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0003.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2025-0003
Published
2025-01-13T12:00:00Z
Modified
2025-01-29T19:29:35Z
Summary
Segmentation fault due to lack of bound check
Details

In this case, the "fast_float::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.

No patched version for fast-float crate has been released, but a patch is available in the fast-float2 fork.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / fast-float

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "fast_float::common::AsciiStr::first"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": null,
    "categories": [
        "memory-exposure"
    ]
}