Vulnerability DatabaseRUSTSEC-2024-0359

RUSTSEC-2024-0359
Rust vulnerability analysis and mitigation

Overview

The vulnerability (RUSTSEC-2024-0359) affects the gix-attributes Rust crate, specifically related to unsound kstring integration. The issue was discovered and reported on July 22, 2024, affecting versions prior to 0.22.3. The vulnerability involves unsafe creation of &str from &[u8] containing non-UTF8 data in the state::ValueRef implementation (GitHub Issue).

Technical details

The vulnerability stems from gix-attributes unsafely creating a &str from a &[u8] containing non-UTF8 data in the state::ValueRef implementation. While the API was designed to prevent accessing the value as str, the non-UTF8 str was inadvertently exposed to external code, including the kstring crate and serde integrations. This exposure could propagate to other dependencies like serdejson and serdeyaml, potentially causing undefined behavior (GitHub Issue).

Impact

The vulnerability results in a soundness issue where using the crate from safe code could cause Undefined Behavior (UB). Performance testing showed that the fix resulted in a 5% performance loss for attribute-matching heavy workloads (GitHub Issue).

Mitigation and workarounds

The issue has been fixed by removing kstring in favor of BString. Users should upgrade to version 0.22.3 or later to receive the fix. The solution trades some performance for safety, with the fixed version showing approximately 5% slower performance in attribute-matching workloads (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66627HIGH8.4
  • RustRust
  • wasmi
NoYesDec 09, 2025
GHSA-xrv8-2pf5-f3q7MEDIUM6
  • RustRust
  • nitro-tpm-pcr-compute
NoYesDec 05, 2025
CVE-2025-67487MEDIUM5.5
  • RustRust
  • static-web-server
NoYesDec 09, 2025
CVE-2025-66622LOW1.3
  • RustRust
  • matrix-sdk-base
NoYesDec 09, 2025
RUSTSEC-2025-0135N/AN/A
  • RustRust
  • matrix-sdk-base
NoYesDec 08, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management