Use After Free Affecting cassandra-cpp package, versions <3.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-CASSANDRACPP-6305969
  • published29 Feb 2024
  • disclosed28 Feb 2024
  • creditCastleQuirm

Introduced: 28 Feb 2024

CVE-2024-27284  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade cassandra-cpp to version 3.0.0 or higher.

Overview

Affected versions of this package are vulnerable to Use After Free due to the improper handling of iterator advancement. An attacker can access freed memory and cause undefined behavior by using an item returned by an iterator after the iterator has advanced to the next item.

Note: Such code will almost always fail immediately, so it is unlikely that any code using this pattern would have reached production.

Workaround

Use get_first_row() rather than an iterator or completely process an item before advancing the iterator with next().

References

CVSS Scores

version 3.1