Vulnerability DatabaseGHSA-7v4j-8wvr-v55r

GHSA-7v4j-8wvr-v55r
Rust vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-7v4j-8wvr-v55r) affects the array-macro Rust crate versions 2.1.0 to 2.1.2, discovered on April 27, 2022. The issue involves the array! macro's unsound behavior when handling impure constant expressions as array lengths. This moderate severity vulnerability was officially published to the GitHub Advisory Database on June 16, 2022, and last updated on January 12, 2023 (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from the array-macro crate substituting the array length provided by a user at compile-time multiple times. The implementation contained the count expression in two distinct places: in the array vector initialization and in the while loop condition. When an impure constant expression (such as a result from an impure procedural macro) is passed as an array length, these two instances could evaluate to different values, leading to potential memory corruption (GitLab Issue).

Impact

When exploited, this vulnerability can result in the initialization of an array with uninitialized types, which could potentially allow an attacker to execute arbitrary code. The issue affects memory safety and can lead to memory corruption and memory exposure (RustSec Advisory).

Mitigation and workarounds

The vulnerability was patched in version 2.1.2 of the array-macro crate. The fix was implemented in commit d5b63f72, ensuring that the array length is substituted just once. Users are advised to upgrade to version 2.1.2 or later to address this security issue (GitHub Advisory).

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-2026-22257HIGH8.8
  • RustRust
  • salvo
NoYesJan 08, 2026
CVE-2026-22698HIGH8.7
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22699HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
GHSA-g59m-gf8j-gjf5LOW3.7
  • RustRust
  • aws-sdk-controlcatalog
NoYesJan 08, 2026
GHSA-585q-cm62-757jLOW2
  • RustRust
  • mnl
NoNoJan 09, 2026

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