CVE-2024-27284
Rust vulnerability analysis and mitigation

Overview

cassandra-rs, a Cassandra (CQL) driver for Rust, contains a use-after-free vulnerability in versions prior to 3.0.0. The vulnerability was discovered on February 28, 2024, and affects code that attempts to use an item (e.g., a row) returned by an iterator after the iterator has advanced to the next item (GitHub Advisory).

Technical details

The vulnerability stems from a non-idiomatic use of iterators where accessing an item after calling next() on the iterator results in accessing freed memory. The issue occurs because the underlying Cassandra driver invalidates the current item when next() is called, which was not properly reflected in the Rust binding prior to version 3.0.0. The vulnerability has been assigned CVE-2024-27284 and is classified as CWE-416 (Use After Free). The CVSS v3.1 score is 7.5 (High) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (GitHub Advisory).

Impact

When exploited, this vulnerability leads to undefined behavior due to accessing freed memory. While the severity is rated as high due to being a use-after-free bug, it typically results in immediate program failure, making it unlikely that vulnerable code would have reached production environments. The impact primarily affects applications that use items returned by a cassandra-rs iterator after calling next() on that iterator (GitHub Advisory).

Exploitability

The vulnerability is triggered when code attempts to use an item returned by an iterator after the iterator has advanced to the next item. However, such code patterns typically fail immediately, making successful exploitation unlikely in production environments. The vulnerability requires no special privileges or user interaction to exploit (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in version 3.0.0 of cassandra-rs. Users are strongly recommended to upgrade to this version. For those unable to upgrade immediately, workarounds include using get_first_row() rather than an iterator, or ensuring all processing of an item is completed before advancing the iterator with next(). The fix involves implementing a new LendingIterator trait instead of the standard Iterator trait (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

GHSA-mc9m-6fm9-pghcMEDIUM6.9
  • Python logoPython
  • zoo-kcl
NoYesAug 20, 2026
GHSA-jgvr-6x5w-hx5wMEDIUM6.9
  • Python logoPython
  • zoo-kcl
NoYesAug 20, 2026
CVE-2026-54136MEDIUM5.1
  • Rust logoRust
  • windmill-api
NoYesAug 20, 2026
RUSTSEC-2026-0266NONEN/A
  • Rust logoRust
  • internment
NoYesAug 20, 2026
RUSTSEC-2026-0265NONEN/A
  • Rust logoRust
  • proc-macro1
NoNoAug 20, 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