Use After Free Affecting rusqlite package, versions >=0.25.0 <0.25.4>=0.26.0 <0.26.2


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

EPSS
0.1% (44th 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-RUSQLITE-2326715
  • published27 Dec 2021
  • disclosed27 Dec 2021
  • creditUnknown

Introduced: 27 Dec 2021

CVE-2021-45718  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade rusqlite to version 0.25.4, 0.26.2 or higher.

Overview

rusqlite is a wrapper for using SQLite from Rust.

Affected versions of this package are vulnerable to Use After Free. If a closure referencing borrowed values on the stack is passed to one of the following functions, it could allow access to objects on the stack after they have been dropped.

The impacted functions are:

rusqlite::Connection::commit_hook

rusqlite::Connection::create_aggregate_function

rusqlite::Connection::create_collation

rusqlite::Connection::create_scalar_function

rusqlite::Connection::create_window_function

rusqlite::Connection::rollback_hook

rusqlite::Connection::update_hook

CVSS Scores

version 3.1