Vulnerability DatabaseGHSA-h5j3-crg5-8jqm

GHSA-h5j3-crg5-8jqm
Rust vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-h5j3-crg5-8jqm) affects the orx-pinned-vec Rust crate versions prior to 3.21.0, discovered and disclosed on October 21, 2025. The issue resides in the safe function index_of_ptr which exhibits undefined behavior when called with empty slices. This vulnerability affects the memory safety guarantees of Rust programs using the affected versions of the crate (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability occurs in the index_of_ptr function when processing empty slices. The problematic line ptr.add(slice.len() - 1) causes an integer underflow when slice.len() is 0, resulting in the creation of a pointer with a massive offset. According to Rust's safety rules, creating such a pointer constitutes immediate undefined behavior, even without dereferencing it. The vulnerability is classified with CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) and CWE-191 (Integer Underflow). The issue has been assigned a CVSS v4.0 score of 2.0 (Low severity) (GitHub Advisory).

Impact

The vulnerability can lead to undefined behavior in Rust programs using the affected versions of orx-pinned-vec, particularly when processing empty slices. This could potentially result in memory corruption or program crashes, though the impact is considered low as it requires specific conditions to trigger (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in version 3.21.0 of orx-pinned-vec. The fix replaces the problematic pointer arithmetic with a safer method using slice.as_ptr_range().contains() to check if the pointer is within the slice's bounds. Users should upgrade to version 3.21.0 or later to address this issue (GitHub PR).

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