GHSA-jqcp-xc3v-f446: Fast float2 Fast-float2 Has A Segmentation Fault Vulnerability

MODERATE
Published
Advisory Summary

GHSA-jqcp-xc3v-f446 is a MODERATE fast-float2 has a segmentation fault vulnerability (General Security Weakness) affecting Fast float2 libraries in the crates.io ecosystem. The issue involves fast-float2 has a segmentation fault due to lack of bound check. Remediation is available by upgrading affected packages to version 0.2.2.

GHSA-jqcp-xc3v-f446 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jqcp-xc3v-f446
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Fast float2
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-jqcp-xc3v-f446

To remediate this vulnerability, upgrade all affected Fast float2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fast-float2 fixed: 0.2.2
Upgrade fast-float2 to 0.2.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for fast-float2

How to Check if You Are Affected

To determine whether your application is affected by GHSA-jqcp-xc3v-f446, inspect your project dependencies for Fast float2:

inspect dependencies for fast-float2

Analyze the terminal output to locate any version of Fast float2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Fast float2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-jqcp-xc3v-f446 Affected Fast float2 Versions

1 component(s)
Fixed Versions:
0.2.2
Product / Package Ecosystem Affected Versions Fixed Version
fast-float2
crates.io
< 0.2.2
0.2.2

References

Frequently Asked Questions

What is GHSA-jqcp-xc3v-f446?
GHSA-jqcp-xc3v-f446 is a security vulnerability in Fast float2 involving fast-float2 has a segmentation fault due to lack of bound check under General Security Weakness.
Which Fast float2 versions are affected?
Affected versions include releases prior to 0.2.2 across affected packages: fast-float2.
What version fixes GHSA-jqcp-xc3v-f446?
Upgrading to 0.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fast-float2 affected?
Yes, fast-float2 is affected in releases prior to 0.2.2. Upgrade your dependency to 0.2.2 or later.
What CWE is associated with GHSA-jqcp-xc3v-f446?
GHSA-jqcp-xc3v-f446 is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-jqcp-xc3v-f446?
Run the dependency tree command: 'inspect dependencies for fast-float2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jqcp-xc3v-f446",
  "modified" : "2025-01-29T22:21:13Z",
  "published" : "2025-01-29T22:19:01Z",
  "aliases" : [ ],
  "summary" : "fast-float2 has a segmentation fault due to lack of bound check",
  "details" : "In this case, the \"fast_float2::common::AsciiStr::first\" method within the \"AsciiStr\" struct \nuses the unsafe keyword to reading from memory without performing bounds checking. \nSpecifically, it directly dereferences a pointer offset by \"self.ptr\".\nBecause of the above reason, the method accesses invalid memory address when it takes an empty string as its input.\nThis approach violates Rust’s memory safety guarantees, as it can lead to invalid memory access if empty buffer is provided.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "fast-float2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aldanor/fast-float-rust/issues/38"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Alexhuszagh/fast-float-rust/pull/7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Alexhuszagh/fast-float-rust"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0002.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-29T22:19:01Z",
    "nvd_published_at" : null
  }
}