CVE-2021-45714
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_aggregate_function has a use-after-free.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_aggregate_function has a use-after-free.
- Record
CVE-2021-45714- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-416
- Updated
- 2026-11-02
CVE List No score
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_aggregate_function has a use-after-free.
- Record
CVE-2021-45714- Updated
- 2026-11-02
EUVDEUVD-2022-0573 No score
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_aggregate_function has a use-after-free.
- Record
EUVD-2022-0573- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f6f2-3w33-54r9
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_aggregate_function has a use-after-free.
- Record
GHSA-f6f2-3w33-54r9- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-416
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-q89g-4vhh-mvvm No score
Incorrect Lifetime Bounds on Closures in `rusqlite`
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.
The impacted functions are:
- Under
cfg(feature = "functions"):Connection::create_scalar_function,Connection::create_aggregate_functionandConnection::create_window_function. - Under
cfg(feature = "hooks"):Connection::commit_hook,Connection::rollback_hookandConnection::update_hook. - Under
cfg(feature = "collation"):Connection::create_collation.
The 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).
The 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.
- Record
GHSA-q89g-4vhh-mvvm- Updated
- 2026-11-02
OSVCVE-2021-45713
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_scalar_function has a use-after-free.
- Record
CVE-2021-45713- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 15 moreShow less
OSV
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_aggregate_function has a use-after-free.
- Record
CVE-2021-45714- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCVE-2021-45715
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_window_function has a use-after-free.
- Record
CVE-2021-45715- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCVE-2021-45716
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_collation has a use-after-free.
- Record
CVE-2021-45716- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCVE-2021-45717
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. commit_hook has a use-after-free.
- Record
CVE-2021-45717- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCVE-2021-45718
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. rollback_hook has a use-after-free.
- Record
CVE-2021-45718- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCVE-2021-45719
7.5
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. update_hook has a use-after-free.
- Record
CVE-2021-45719- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-4qr3-m7ww-hh9g
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. commit_hook has a use-after-free.
- Record
GHSA-4qr3-m7ww-hh9g- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-87xh-9q6h-r5cc
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_window_function has a use-after-free.
- Record
GHSA-87xh-9q6h-r5cc- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-92cx-4xm7-jr9m
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_scalar_function has a use-after-free.
- Record
GHSA-92cx-4xm7-jr9m- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-cm8g-544f-p9x9
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_collation has a use-after-free.
- Record
GHSA-cm8g-544f-p9x9- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-f6f2-3w33-54r9
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. create_aggregate_function has a use-after-free.
- Record
GHSA-f6f2-3w33-54r9- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-g4g4-3pqw-8m7f
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. rollback_hook has a use-after-free.
- Record
GHSA-g4g4-3pqw-8m7f- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-g87r-23vw-7f87
7.5
Use After Free in rusqlite
An issue was discovered in the rusqlite crate 0.25.x before 0.25.4 and 0.26.x before 0.26.2 for Rust. update_hook has a use-after-free.
- Record
GHSA-g87r-23vw-7f87- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-q89g-4vhh-mvvm No score
Incorrect Lifetime Bounds on Closures in `rusqlite`
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.
The impacted functions are:
- Under
cfg(feature = "functions"):Connection::create_scalar_function,Connection::create_aggregate_functionandConnection::create_window_function. - Under
cfg(feature = "hooks"):Connection::commit_hook,Connection::rollback_hookandConnection::update_hook. - Under
cfg(feature = "collation"):Connection::create_collation.
The 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).
The 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.
- Record
GHSA-q89g-4vhh-mvvm- Updated
- 2026-11-02
OSVRUSTSEC-2021-0128 No score
Incorrect Lifetime Bounds on Closures in `rusqlite`
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.
The impacted functions are:
- Under
cfg(feature = "functions"):Connection::create_scalar_function,Connection::create_aggregate_functionandConnection::create_window_function. - Under
cfg(feature = "hooks"):Connection::commit_hook,Connection::rollback_hookandConnection::update_hook. - Under
cfg(feature = "collation"):Connection::create_collation.
The 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).
The 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.
- Record
RUSTSEC-2021-0128- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rusqlitecrates.io |
0.25.0 up to 0.25.4 | 0.25.4 |
rusqlitecrates.io |
0.26.0 up to 0.26.2 | 0.26.2 |
rusqlitecrates.io From an advisory covering 7 CVEs |
0.25.0 up to 0.25.4 | 0.25.4 |
rusqlitecrates.io From an advisory covering 7 CVEs |
0.26.0 up to 0.26.2 | 0.26.2 |
rusqlitecrates.io From an advisory covering 7 CVEs |
0.25.0 up to 0.25.4, 0.26.0-0 up to 0.26.2 | 0.25.40.26.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-45714 is a high vulnerability (CVSS 7.5) in Rusqlite Project Rusqlite, published December 7, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.22%, the 68th percentile. Fixed in rusqlite 0.25.4.
References
rustsec.org/advisories/RUSTSEC-2021-0128.html
raw.githubusercontent.com/rustsec/advisory-db/main/crates/rusqlite/RUSTSEC-2021-0128.md
nvd.nist.gov/vuln/detail/CVE-2021-45714
github.com/rusqlite/rusqlite/issues/1048
github.com/advisories/GHSA-f6f2-3w33-54r9
github.com/advisories/GHSA-q89g-4vhh-mvvm
Show 13 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-45717
github.com/rusqlite/rusqlite
nvd.nist.gov/vuln/detail/CVE-2021-45715
nvd.nist.gov/vuln/detail/CVE-2021-45713
github.com/rusqlite/rusqlite/pull/1049
github.com/rusqlite/rusqlite/commit/30f8c8c502675011603c4d066396bf317fd49e71
github.com/rusqlite/rusqlite/commit/612158507e90f41d409cd0fa80eb21c992b1bc08
github.com/rusqlite/rusqlite/commit/934e0c709e156753881da98b32e9853f9ffe4a1b
github.com/rusqlite/rusqlite/commit/f4f95f8caf9fd53bffd0c19530be2484c644cc16
nvd.nist.gov/vuln/detail/CVE-2021-45716
nvd.nist.gov/vuln/detail/CVE-2021-45718
nvd.nist.gov/vuln/detail/CVE-2021-45719
crates.io/crates/rusqlite