{"id":"RUSTSEC-2026-0172","revision":null,"records":[{"revision":"9b39edb1220f4fd5a2dc0189eed4c2dc","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-ggxf-9f6j-w742","aliases":["RUSTSEC-2026-0172"],"title":"Diesel has possible use after free when deserializing a SQLite database via `SqliteConnection::deserialize_readonly_database`","description":"Diesel allows loading a SQLite database from a byte buffer, represented as `&[u8]`, at runtime via the `SqliteConnection::deserialize_readonly_database` function. In previous versions of Diesel, this buffer was passed directly to libsqlite3. Since libsqlite3 requires the buffer to remain alive for as long as the database connection is open and Diesel did not ensure this as part of its safe API, callers of `SqliteConnection::deserialize_readonly_database` could drop the buffer prematurely. This prematurely drop caused libsqlite3 to operate on freed memory.\n\nThis vulnerability affects users of `SqliteConnection::deserialize_readonly_database` who drop the buffer passed to the function before they drop the database connection.\n\n## Mitigation\n\nThe preferred mitigation to the outlined problem is to update to Diesel version 2.3.10 or newer, which includes a fix for the problem. Alternatively users need to take to keep the buffer alive until the connection is dropped.\n\n## Resolution\n\nDiesel now stores a copy of the buffer inside of the `SqliteConnection` object itself to keep it alive as long as the underlying libsqlite3 connection exists.","state":0,"publishedAt":"2026-07-16T19:25:25+00:00","modifiedAt":"2026-07-17T08:56:39.2433028+00:00","affected":[{"ecosystem":"crates.io","name":"diesel","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.3.10"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/diesel-rs/diesel/commit/1bc2ea46d9840e8d9af844239d3c84f37fe7d84b","https://github.com/diesel-rs/diesel","https://rustsec.org/advisories/RUSTSEC-2026-0172.html"],"sourceUrl":"https://github.com/advisories/GHSA-ggxf-9f6j-w742","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-ggxf-9f6j-w742","identifiers":["GHSA-ggxf-9f6j-w742","RUSTSEC-2026-0172"]},"retained":false,"historicalAffected":[]},{"revision":"b45c4868b0b6417e976190c52ff4c544","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0172","aliases":["GHSA-ggxf-9f6j-w742"],"title":"Possible use after free when deserializing a SQLite database via `SqliteConnection::deserialize_readonly_database`","description":"Diesel allows loading a SQLite database from a byte buffer, represented as `&[u8]`, at runtime via the `SqliteConnection::deserialize_readonly_database` function. In previous versions of Diesel, this buffer was passed directly to libsqlite3. Since libsqlite3 requires the buffer to remain alive for as long as the database connection is open and Diesel did not ensure this as part of its safe API, callers of `SqliteConnection::deserialize_readonly_database` could drop the buffer prematurely. This prematurely drop caused libsqlite3 to operate on freed memory.\n\nThis vulnerability affects users of `SqliteConnection::deserialize_readonly_database` who drop the buffer passed to the function before they drop the database connection.\n\n## Mitigation\n\nThe preferred mitigation to the outlined problem is to update to Diesel version 2.3.10 or newer, which includes a fix for the problem. Alternatively users need to take to keep the buffer alive until the connection is dropped.\n\n## Resolution\n\nDiesel now stores a copy of the buffer inside of the `SqliteConnection` object itself to keep it alive as long as the underlying libsqlite3 connection exists.","state":0,"publishedAt":"2026-06-05T12:00:00+00:00","modifiedAt":"2026-07-17T08:45:04.2593107+00:00","affected":[{"ecosystem":"crates.io","name":"diesel","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"2.3.10"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/diesel","https://rustsec.org/advisories/RUSTSEC-2026-0172.html","https://github.com/diesel-rs/diesel/commit/1bc2ea46d9840e8d9af844239d3c84f37fe7d84b"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0172","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0172","identifiers":["RUSTSEC-2026-0172","GHSA-ggxf-9f6j-w742"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T15:27:37.4126745+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T15:27:37.4126745+00:00","lastSuccessAt":"2026-11-24T15:27:37.6241767+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:27:37.6241771+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-df50bcd17e90a3371298109ea504791e554fa139cf110c9e4299b8d427b98a7b","complete":true,"records":431339,"lastAttemptAt":"2026-11-24T15:25:35.4865231+00:00","lastSuccessAt":"2026-11-24T15:25:35.3489378+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:25:35.4865231+00:00","snapshotPublishedAt":"2026-11-24T14:30:39+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-c2da376b27c645ccbbed2e0234bd07bd","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T15:30:13.7888885+00:00","lastSuccessAt":"2026-11-24T15:30:13.784+00:00","error":"180 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T15:30:13.784+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13791,"expectedIdentifiers":13982,"failedIdentifiers":180},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T15:27:37.4126745+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T15:27:37.4126745+00:00","lastSuccessAt":"2026-11-24T15:27:37.7117201+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:27:37.7117205+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-dd0124aa454041daa6390d321cbaa422","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T15:28:07.9768532+00:00","lastSuccessAt":"2026-11-24T15:28:07.968+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:28:07.968+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13483,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T15:27:37.3447915+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:27:37.3447915+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T15:25:35.6214623+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:25:35.6214623+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-3afd4dd07a6bf352a6a53c4438150c464a2527017b95ca94804134ea15f1eba9","complete":true,"records":3220,"lastAttemptAt":"2026-11-24T15:27:37.3582994+00:00","lastSuccessAt":"2026-11-24T10:25:37.8779609+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:27:37.3582994+00:00","snapshotPublishedAt":"2026-11-24T09:33:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-d4ec43f5cfee38989290b04011f2dc8845e8ef74e8b11a5d0a72ce8c76be2839","complete":true,"records":233009,"lastAttemptAt":"2026-11-24T15:27:37.2158898+00:00","lastSuccessAt":"2026-11-24T15:27:36.0836437+00:00","error":null,"lastVerifiedAt":"2026-11-24T15:27:37.2158898+00:00","snapshotPublishedAt":"2026-11-24T14:33:38+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}