GHSA-pqpw-89w5-82v5: Simd json derive `simd-json-derive` Vulnerable To `MaybeUninit` Misuse Vulnerability

MODERATE
Published
Advisory Summary

GHSA-pqpw-89w5-82v5 is a MODERATE `simd-json-derive` vulnerable to `maybeuninit` misuse vulnerability (General Security Weakness) affecting Simd json derive libraries in the crates.io ecosystem. The issue involves `simd-json-derive` vulnerable to `maybeuninit` misuse. Remediation is available by upgrading affected packages to version 0.12.0.

GHSA-pqpw-89w5-82v5 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-pqpw-89w5-82v5
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Simd json derive
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-pqpw-89w5-82v5

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

simd-json-derive fixed: 0.12.0
Upgrade simd-json-derive to 0.12.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 simd-json-derive

How to Check if You Are Affected

To determine whether your application is affected by GHSA-pqpw-89w5-82v5, inspect your project dependencies for Simd json derive:

inspect dependencies for simd-json-derive

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

An invalid use of `MaybeUninit::uninit().assume_init()` in `simd-json-derive`'s derive macro can cause undefined behavior. The original code used `MaybeUninit` to avoid initialisation of the struct and then set the fields using `ptr::write`. The undefined behavior triggered by this misuse of `MaybeUninit` can lead to invlaid memory access and panics in binaries compiled in release mode (aka simd-json-derive prior to version 0.12 has UB and optimizes into some nonsense) The version `0.12.0` removes this section of code, avoiding the use of MaybeUninit alltogether.

GHSA-pqpw-89w5-82v5 Affected Simd json derive Versions

1 component(s)
Fixed Versions:
0.12.0
Product / Package Ecosystem Affected Versions Fixed Version
simd-json-derive
crates.io
< 0.12.0
0.12.0

References

Frequently Asked Questions

What is GHSA-pqpw-89w5-82v5?
GHSA-pqpw-89w5-82v5 is a security vulnerability in Simd json derive involving `simd-json-derive` vulnerable to `MaybeUninit` misuse under General Security Weakness.
Which Simd json derive versions are affected?
Affected versions include releases prior to 0.12.0 across affected packages: simd-json-derive.
What version fixes GHSA-pqpw-89w5-82v5?
Upgrading to 0.12.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is simd-json-derive affected?
Yes, simd-json-derive is affected in releases prior to 0.12.0. Upgrade your dependency to 0.12.0 or later.
What CWE is associated with GHSA-pqpw-89w5-82v5?
GHSA-pqpw-89w5-82v5 is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-pqpw-89w5-82v5?
Run the dependency tree command: 'inspect dependencies for simd-json-derive'. 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-pqpw-89w5-82v5",
  "modified" : "2024-11-12T20:53:55Z",
  "published" : "2024-11-12T20:53:54Z",
  "aliases" : [ ],
  "summary" : "`simd-json-derive` vulnerable to `MaybeUninit` misuse",
  "details" : "An invalid use of `MaybeUninit::uninit().assume_init()` in `simd-json-derive`'s derive macro can cause undefined behavior. The original code used `MaybeUninit` to avoid initialisation of the struct and then set the fields using `ptr::write`. The undefined behavior triggered by this misuse of `MaybeUninit` can lead to invlaid memory access and panics in binaries compiled in release mode (aka simd-json-derive prior to version 0.12 has UB and optimizes into some nonsense)\n\nThe version `0.12.0` removes this section of code, avoiding the use of MaybeUninit alltogether.\n",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "simd-json-derive"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.12.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/simd-lite/simd-json-derive/issues/67"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/simd-lite/simd-json-derive"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0087.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-12T20:53:54Z",
    "nvd_published_at" : null
  }
}