{"id":"CVE-2021-45719","aliases":["EUVD-2022-0599","GHSA-g87r-23vw-7f87","GHSA-q89g-4vhh-mvvm","RUSTSEC-2021-0128"],"status":"published","title":"Use After Free in rusqlite","description":"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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.01219,"percentile":0.69033,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2021-12-07T12:00:00Z","modified":"2026-11-10T02:30:59Z","fixes":[{"ecosystem":"crates.io","package":"rusqlite","fixed_in":["0.25.4","0.26.2"],"sources":["ghsa"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"}]}],"bundled":7},{"source":"osv","ecosystem":"crates.io","package":"rusqlite","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.4"},{"introduced":"0.26.0-0"},{"fixed":"0.26.2"}]}],"bundled":7}],"products":[{"vendor":"rusqlite_project","product":"rusqlite"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0128.html","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/rusqlite/RUSTSEC-2021-0128.md","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45719","tags":["advisory"]},{"url":"https://github.com/rusqlite/rusqlite/issues/1048","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-g87r-23vw-7f87"},{"url":"https://github.com/advisories/GHSA-q89g-4vhh-mvvm"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45717","tags":["advisory"]},{"url":"https://github.com/rusqlite/rusqlite","tags":["package","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45715","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45713","tags":["advisory"]},{"url":"https://github.com/rusqlite/rusqlite/pull/1049","tags":["web"]},{"url":"https://github.com/rusqlite/rusqlite/commit/30f8c8c502675011603c4d066396bf317fd49e71","tags":["web"]},{"url":"https://github.com/rusqlite/rusqlite/commit/612158507e90f41d409cd0fa80eb21c992b1bc08","tags":["web"]},{"url":"https://github.com/rusqlite/rusqlite/commit/934e0c709e156753881da98b32e9853f9ffe4a1b","tags":["web"]},{"url":"https://github.com/rusqlite/rusqlite/commit/f4f95f8caf9fd53bffd0c19530be2484c644cc16","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45716","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45714","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45718","tags":["advisory"]},{"url":"https://crates.io/crates/rusqlite","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-45719","description":"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.","status":"published","published":"2021-12-26T21:45:28Z","modified":"2024-08-04T04:47:02.125Z","updated_at":"2026-11-02T14:33:02.580561Z"}],"euvd":[{"id":"EUVD-2022-0599","description":"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.","status":"published","published":"2021-12-26T21:45:28Z","modified":"2024-08-04T04:47:02Z","updated_at":"2026-11-03T03:08:25.77408Z"}],"ghsa":[{"id":"GHSA-g87r-23vw-7f87","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:00:21Z","modified":"2023-06-13T20:20:32Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:36:54.225318Z"},{"id":"GHSA-q89g-4vhh-mvvm","title":"Incorrect Lifetime Bounds on Closures in `rusqlite`","description":"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","status":"published","published":"2022-06-17T00:16:48Z","modified":"2023-06-13T20:43:04Z","updated_at":"2026-11-02T14:36:54.225318Z"}],"nvd":[{"id":"CVE-2021-45719","description":"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.","status":"published","published":"2021-12-26T22:15:09.353Z","modified":"2026-06-17T04:14:00.8Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:07:02.977492Z"}],"osv":[{"id":"CVE-2021-45713","description":"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.","status":"published","published":"2021-12-26T22:15:09.093Z","modified":"2026-11-10T02:30:59.139474581Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-11T11:06:19.881476Z"},{"id":"CVE-2021-45714","description":"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.","status":"published","published":"2021-12-26T22:15:09.137Z","modified":"2026-11-10T02:30:55.392719763Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-11T11:06:19.881476Z"},{"id":"CVE-2021-45715","description":"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.","status":"published","published":"2021-12-26T22:15:09.18Z","modified":"2026-11-10T02:30:34.281050226Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-10T02:45:53.470331Z"},{"id":"CVE-2021-45716","description":"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.","status":"published","published":"2021-12-26T22:15:09.223Z","modified":"2026-11-10T02:30:47.338349754Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-11T11:06:19.881476Z"},{"id":"CVE-2021-45717","description":"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.","status":"published","published":"2021-12-26T22:15:09.267Z","modified":"2026-11-10T02:30:30.916250127Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-10T02:45:56.338826Z"},{"id":"CVE-2021-45718","description":"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.","status":"published","published":"2021-12-26T22:15:09.307Z","modified":"2026-11-10T02:30:47.73891488Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-11T11:06:19.881476Z"},{"id":"CVE-2021-45719","description":"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.","status":"published","published":"2021-12-26T22:15:09.353Z","modified":"2026-11-10T02:30:50.905357855Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-11T11:06:19.881476Z"},{"id":"GHSA-4qr3-m7ww-hh9g","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:01:40Z","modified":"2024-03-15T00:05:18.74875Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:37.528068Z"},{"id":"GHSA-87xh-9q6h-r5cc","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:00:49Z","modified":"2024-03-15T00:05:18.74875Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:42.077781Z"},{"id":"GHSA-92cx-4xm7-jr9m","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:02:56Z","modified":"2024-03-15T00:05:18.74875Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:43.123867Z"},{"id":"GHSA-cm8g-544f-p9x9","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:03:16Z","modified":"2024-03-15T00:05:18.74875Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:45.28161Z"},{"id":"GHSA-f6f2-3w33-54r9","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:02:36Z","modified":"2024-03-15T00:05:18.74875Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:46.006631Z"},{"id":"GHSA-g4g4-3pqw-8m7f","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:02:01Z","modified":"2024-03-15T00:05:18.74875Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:47.119724Z"},{"id":"GHSA-g87r-23vw-7f87","title":"Use After Free in rusqlite","description":"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.","status":"published","published":"2022-01-06T22:00:21Z","modified":"2024-03-15T00:05:18.74875Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:47.472172Z"},{"id":"GHSA-q89g-4vhh-mvvm","title":"Incorrect Lifetime Bounds on Closures in `rusqlite`","description":"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","status":"published","published":"2022-06-17T00:16:48Z","modified":"2024-03-15T00:05:18.74875Z","updated_at":"2026-11-02T15:46:54.40888Z"},{"id":"RUSTSEC-2021-0128","title":"Incorrect Lifetime Bounds on Closures in `rusqlite`","description":"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.","status":"published","published":"2021-12-07T12:00:00Z","modified":"2024-03-15T00:05:18.74875Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
