Vulnerability DatabaseGHSA-h6xm-c6r4-vmwf

GHSA-h6xm-c6r4-vmwf
Rust vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-h6xm-c6r4-vmwf) affects the spl-token-swap Rust library, discovered and disclosed on December 23, 2024. The issue involves unsound implementations of u8 type casting in the library's public API unpack function, which can lead to undefined behaviors when casting u8 arrays to arbitrary types. This vulnerability affects all versions up to and including 3.0.0, with no patched versions currently available (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from the instruction::unpack function's implementation where it performs unsafe casting of u8 arrays to arbitrary types. While the function includes length checks to prevent out-of-bound access, it fails to handle two critical issues: misaligned pointer dereferencing when casting u8 pointer to types aligned to larger bytes (e.g., u16), and the potential construction of illegal types when casting to types with specific bit pattern requirements (e.g., bool which can only have 0 or 1 as valid values). The issue has been classified with moderate severity (GitHub Advisory, SPL Issue).

Impact

The vulnerability can result in undefined behaviors in Rust programs using the spl-token-swap library. When exploited, it can cause program panics due to misaligned pointer dereferences and potentially construct invalid values that violate Rust's type safety guarantees. The full extent of potential exploits remains unclear, but the issue fundamentally undermines Rust's safety guarantees (RustSec Advisory).

Mitigation and workarounds

Currently, there are no patched versions available for this vulnerability. The spl-token-swap library has been unmaintained for several years except for dependency upgrades, and the Solana Program Library (SPL) team has indicated that the program is being moved to separate repositories, with spl-token-swap not being carried forward (SPL Issue).

Community reactions

The vulnerability has been included in the RustSec advisory database and will be surfaced by security tools such as cargo-audit or cargo-deny as a warning rather than a hard error, given its nature as an API soundness issue. The Solana Program Library team has acknowledged the issue but indicated that spl-token-swap is being discontinued as part of their repository reorganization (SPL 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-2026-22863CRITICAL9.2
  • RustRust
  • deno
NoYesJan 15, 2026
CVE-2026-23519HIGH8.9
  • RustRust
  • yazi
NoYesJan 15, 2026
RUSTSEC-2026-0003HIGH8.9
  • RustRust
  • cmov
NoYesJan 14, 2026
CVE-2026-22864HIGH8.1
  • RustRust
  • deno
NoYesJan 15, 2026
CVE-2026-22782LOW2.9
  • RustRust
  • rustfs
NoYesJan 16, 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