An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS14OXhjLTYzaGctdmNmcc4AA6qG

cassandra-rs's non-idiomatic use of iterators leads to use after free


Code that attempts to use an item (e.g., a row) returned by an iterator after the iterator has advanced to the next item will be accessing freed memory and experience undefined behaviour. Code that uses the item and then advances the iterator is unaffected. This problem has always existed.

This is a use-after-free bug, so it's rated high severity. If your code uses a pre-3.0.0 version of cassandra-rs, and uses an item returned by a cassandra-rs iterator after calling next() on that iterator, then it is vulnerable. However, such code will almost always fail immediately - so we believe it is unlikely that any code using this pattern would have reached production. For peace of mind, we recommend you upgrade anyway.


The problem has been fixed in version 3.0.0. Users should upgrade to ensure their code cannot use the problematic pattern.


Ensure all usage fits the expected pattern. For example, use get_first_row() rather than an iterator, or completely process an item before advancing the iterator with next().



Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 2 months ago
Updated: about 2 months ago

CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Identifiers: GHSA-x9xc-63hg-vcfq, CVE-2024-27284
References: Repository:
Blast Radius: 4.5

Affected Packages

Dependent packages: 1
Dependent repositories: 4
Downloads: 58,107 total
Affected Version Ranges: < 3.0.0
Fixed in: 3.0.0
All affected versions: 0.8.2, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.13.2, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.17.0, 0.17.1, 0.17.2, 1.0.0, 1.1.0, 1.2.0, 2.0.0, 2.0.1
All unaffected versions: 3.0.0, 3.0.1