GHSA-q89g-4vhh-mvvm: Rusqlite Incorrect Lifetime Bounds On Closures Vulnerability
HIGHGHSA-q89g-4vhh-mvvm is a HIGH incorrect lifetime bounds on closures vulnerability (General Security Weakness) affecting Rusqlite libraries in the crates.io ecosystem. The issue involves incorrect lifetime bounds on closures in `rusqlite`. Remediation is available by upgrading affected packages to version 0.26.2, 0.25.4.
GHSA-q89g-4vhh-mvvm at a Glance
How to Fix GHSA-q89g-4vhh-mvvm
To remediate this vulnerability, upgrade all affected Rusqlite dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rusqlite to 0.26.2
Upgrade rusqlite to 0.25.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rusqlite
How to Check if You Are Affected
To determine whether your application is affected by GHSA-q89g-4vhh-mvvm, inspect your project dependencies for Rusqlite:
inspect dependencies for rusqlite
Analyze the terminal output to locate any version of Rusqlite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.26.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Rusqlite, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-q89g-4vhh-mvvm Affected Rusqlite Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rusqlite
|
crates.io |
≥ 0.26.0
< 0.26.2
|
0.26.2
|
|
rusqlite
|
crates.io |
≥ 0.25.0
< 0.25.4
|
0.25.4
|
References
Frequently Asked Questions
What is GHSA-q89g-4vhh-mvvm?
Which Rusqlite versions are affected?
What version fixes GHSA-q89g-4vhh-mvvm?
Is rusqlite affected?
What CWE is associated with GHSA-q89g-4vhh-mvvm?
How can I check crates.io dependencies for GHSA-q89g-4vhh-mvvm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q89g-4vhh-mvvm",
"modified" : "2022-06-17T00:16:48Z",
"published" : "2022-06-17T00:16:48Z",
"aliases" : [ ],
"summary" : "Incorrect Lifetime Bounds on Closures in `rusqlite`",
"details" : "The lifetime bound on several closure-accepting `rusqlite` functions (specifically, functions which register a callback to be later invoked by SQLite) was too relaxed. If a closure referencing borrowed values on the stack is was passed to one of these functions, it could allow Rust code to access objects on the stack after they have been dropped.\n\nThe impacted functions are:\n\n- Under `cfg(feature = \"functions\")`: `Connection::create_scalar_function`, `Connection::create_aggregate_function` and `Connection::create_window_function`.\n- Under `cfg(feature = \"hooks\")`: `Connection::commit_hook`, `Connection::rollback_hook` and `Connection::update_hook`.\n- Under `cfg(feature = \"collation\")`: `Connection::create_collation`.\n\nThe issue exists in all `0.25.*` versions prior to `0.25.4`, and all `0.26.*` versions prior to 0.26.2 (specifically: `0.25.0`, `0.25.1`, `0.25.2`, `0.25.3`, `0.26.0`, and `0.26.1`).\n\nThe fix is available in versions `0.26.2` and newer, and also has been back-ported to `0.25.4`. As it does not exist in `0.24.*`, all affected versions should have an upgrade path to a semver-compatible release.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "rusqlite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.26.0"
}, {
"fixed" : "0.26.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "rusqlite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.25.0"
}, {
"fixed" : "0.25.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rusqlite/rusqlite/issues/1048"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rusqlite/rusqlite"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0128.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:16:48Z",
"nvd_published_at" : null
}
}