{"id":"CVE-2024-27284","aliases":["CVE-2024-27284","GHSA-x9xc-63hg-vcfq","RUSTSEC-2024-0017"],"related":[],"kind":"vulnerability","state":"published","title":"cassandra-rs non-idiomatic use of iterators leads to use after free","summary":"cassandra-rs is a Cassandra (CQL) driver for Rust. 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.  The problem has been fixed in version 3.0.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"cassandra-rs is a Cassandra (CQL) driver for Rust. 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.  The problem has been fixed in version 3.0.0.","source":"cvelist"},{"lang":"en","text":"### Impact\nCode 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.\n\nThis 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.\n\n### Patches\nThe problem has been fixed in version 3.0.0. Users should upgrade to ensure their code cannot use the problematic pattern.\n\n### Workarounds\nEnsure 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()`.\n\n### References\nNone.","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.\n\nThis 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.\n\n## Patches\n\nThe 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.\n\n## Workarounds\n\nEnsure 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()`.","format":"markdown","source":"rustsec"},{"lang":"es","text":"cassandra-rs es un controlador Cassandra (CQL) para Rust. El código que intenta utilizar un elemento (por ejemplo, una fila) devuelto por un iterador después de que el iterador haya avanzado al siguiente elemento accederá a la memoria liberada y experimentará un comportamiento indefinido. El problema se solucionó en la versión 3.0.0.","source":"nvd"}],"published":"2024-02-28T12:00:00.000Z","modified":"2026-10-12T18:00:02.666Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"version":"< 3.0.0","status":"affected"}],"vendor":"Metaswitch","product":"cassandra-rs","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"3.0.0","status":"affected"}],"vendor":"cassandra-rs","product":"cassandra-rs","cpe":"cpe:2.3:a:cassandra-rs:cassandra-rs:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.0"}],"ecosystem":"crates.io","package":"cassandra-cpp","purl":"pkg:cargo/cassandra-cpp","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"3.0.0"}],"ecosystem":"crates.io","package":"cassandra-cpp","purl":"pkg:cargo/cassandra-cpp","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"3.0.0"}],"vendor":"cassandra-rs_project","product":"cassandra-rs","cpe":"cpe:2.3:a:cassandra-rs_project:cassandra-rs:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Metaswitch/cassandra-rs/security/advisories/GHSA-x9xc-63hg-vcfq","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Metaswitch/cassandra-rs/commit/ae054dc8044eac9c2c7ae2b1ab154b53ca7f8df7","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27284","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Metaswitch/cassandra-rs","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0017.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/cassandra-cpp","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-08-12T13:15:18.351Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-27284","url":"https://www.cve.org/CVERecord?id=CVE-2024-27284","licence":"CVE Terms of Use","modified":"2024-08-12T13:21:23.387Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x9xc-63hg-vcfq","url":"https://github.com/advisories/GHSA-x9xc-63hg-vcfq","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:12.870Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0017","url":"https://rustsec.org/advisories/RUSTSEC-2024-0017.html","licence":"CC0-1.0","modified":"2026-10-12T18:00:02.666Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-27284","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27284","licence":"Public domain","modified":"2026-06-17T07:19:34.387Z"}],"updatedAt":"2026-11-25T22:58:37.177Z","epss":{"score":0.00817,"percentile":0.58277,"date":"2026-12-01T12:00:22.000Z"}}