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 package, specifically in versions prior to 3.21.0. The issue was discovered and reported on October 1, 2025, and officially published to the GitHub Advisory Database on October 21, 2025. The vulnerability involves undefined behavior in the safe function index_of_ptr when called with empty slices, which could lead to memory corruption (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability occurs in the index_of_ptr function when processing empty slices. The critical issue lies in the line ptr.add(slice.len() - 1) which underflows when slice.len() is 0, resulting in a pointer with a massive offset. According to Rust's safety rules, creating such a pointer causes immediate undefined behavior. The vulnerability has been assigned a Low severity rating with a CVSS score of 2.0, and is associated with CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) and CWE-191 (Integer Underflow) (GitHub Advisory).

Impact

The vulnerability can lead to undefined behavior in the Rust program, potentially causing memory corruption issues. While the severity is rated as Low, the undefined behavior violates Rust's core safety guarantees, as a safe function should not cause undefined behavior with any input (GitHub Issue).

Mitigation and workarounds

The vulnerability has been fixed in version 3.21.0 of orx-pinned-vec. The fix includes a refactoring of the index_of_ptr method, simplifying the implementation using standard methods such as slice.as_ptr_range() and ptr.offset_from. The fix makes the use of unsafe blocks more clear and better documented (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-62518HIGH8.1
  • RustRust
  • rust-astral-tokio-tar
NoYesOct 21, 2025
GHSA-fp5x-7m4q-449fLOW2
  • RustRust
  • direct_ring_buffer
NoYesOct 21, 2025
GHSA-h5j3-crg5-8jqmLOW2
  • RustRust
  • orx-pinned-vec
NoYesOct 21, 2025
RUSTSEC-2025-0107N/AN/A
  • RustRust
  • borrowck_sacrifices
NoYesOct 21, 2025
RUSTSEC-2025-0106N/AN/A
  • RustRust
  • orx-pinned-vec
NoYesOct 21, 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