GHSA-2326-pfpj-vx3h: Lexical core Lexical-core Has Multiple Soundness Issues Vulnerability

LOW
Published
Advisory Summary

GHSA-2326-pfpj-vx3h is a LOW lexical-core has multiple soundness issues vulnerability (General Security Weakness) affecting Lexical core libraries in the crates.io ecosystem. The issue involves lexical-core has multiple soundness issues. Remediation is available by upgrading affected packages to version 1.0.0.

GHSA-2326-pfpj-vx3h at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-2326-pfpj-vx3h
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Lexical core
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-2326-pfpj-vx3h

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

lexical-core fixed: 1.0.0
Upgrade lexical-core to 1.0.0
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 lexical-core

How to Check if You Are Affected

To determine whether your application is affected by GHSA-2326-pfpj-vx3h, inspect your project dependencies for Lexical core:

inspect dependencies for lexical-core

Analyze the terminal output to locate any version of Lexical core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), 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 Lexical core, 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

`RUSTSEC-2024-0377` contains multiple soundness issues: 1. [Bytes::read() allows creating instances of types with invalid bit patterns](https://github.com/Alexhuszagh/rust-lexical/issues/102) 1. [BytesIter::read() advances iterators out of bounds](https://github.com/Alexhuszagh/rust-lexical/issues/101) 1. [The `BytesIter` trait has safety invariants but is public and not marked `unsafe`](https://github.com/Alexhuszagh/rust-lexical/issues/104) 1. [`write_float()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine](https://github.com/Alexhuszagh/rust-lexical/issues/95) 1. [`radix()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine](https://github.com/Alexhuszagh/rust-lexical/issues/126) Version 1.0 fixes these issues, removes the vast majority of `unsafe` code, and also fixes some correctness issues.

GHSA-2326-pfpj-vx3h Affected Lexical core Versions

1 component(s)
Fixed Versions:
1.0.0
Product / Package Ecosystem Affected Versions Fixed Version
lexical-core
crates.io
< 1.0.0
1.0.0

References

Frequently Asked Questions

What is GHSA-2326-pfpj-vx3h?
GHSA-2326-pfpj-vx3h is a security vulnerability in Lexical core involving lexical-core has multiple soundness issues under General Security Weakness.
Which Lexical core versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: lexical-core.
What version fixes GHSA-2326-pfpj-vx3h?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lexical-core affected?
Yes, lexical-core is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What CWE is associated with GHSA-2326-pfpj-vx3h?
GHSA-2326-pfpj-vx3h is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-2326-pfpj-vx3h?
Run the dependency tree command: 'inspect dependencies for lexical-core'. 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-2326-pfpj-vx3h",
  "modified" : "2024-09-16T17:19:01Z",
  "published" : "2024-09-16T17:19:01Z",
  "aliases" : [ ],
  "summary" : "lexical-core has multiple soundness issues",
  "details" : "`RUSTSEC-2024-0377` contains multiple soundness issues:\n\n 1. [Bytes::read() allows creating instances of types with invalid bit patterns](https://github.com/Alexhuszagh/rust-lexical/issues/102)\n 1. [BytesIter::read() advances iterators out of bounds](https://github.com/Alexhuszagh/rust-lexical/issues/101)\n 1. [The `BytesIter` trait has safety invariants but is public and not marked `unsafe`](https://github.com/Alexhuszagh/rust-lexical/issues/104)\n 1. [`write_float()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine](https://github.com/Alexhuszagh/rust-lexical/issues/95)\n 1. [`radix()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine](https://github.com/Alexhuszagh/rust-lexical/issues/126)\n\nVersion 1.0 fixes these issues, removes the vast majority of `unsafe` code, and also fixes some correctness issues.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "lexical-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Alexhuszagh/rust-lexical/issues/101"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Alexhuszagh/rust-lexical/issues/102"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Alexhuszagh/rust-lexical/issues/104"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Alexhuszagh/rust-lexical/issues/126"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Alexhuszagh/rust-lexical/issues/95"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Alexhuszagh/rust-lexical"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-c2hm-mjxv-89r4"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0055"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0086.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-16T17:19:01Z",
    "nvd_published_at" : null
  }
}