Email me

Rust advisories / cassandra-cpp

Unsound HighRUSTSEC-2024-0017 · cassandra-cpp

RUSTSEC-2024-0017: Non-idiomatic use of iterators leads to use after free

Short answercassandra-cpp has an API that can cause undefined behaviour from safe code: Non-idiomatic use of iterators leads to use after free. Fixed in 3.0.0.

Cratecassandra-cpp
TypeUnsound (memory-corruption, memory-exposure)
Affected versionsBefore 3.0.0.
Fixed in3.0.0
SeverityHigh (GitHub rating)
Published2024-02-28
Last changed2026-10-12
Also known asCVE-2024-27284, GHSA-x9xc-63hg-vcfq

What to do

  1. See which version you have: cargo tree -i cassandra-cpp (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p cassandra-cpp. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example cassandra-cpp = "3.0.0") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

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.

Patches

The problem has been fixed in version 3.0.0 (commit 299e6ac50f87eb2823a373baec37b590a74994ee). Users should upgrade to ensure their code cannot use the problematic pattern. There is an upgrade guide in the project README.

Workarounds

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().

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ