🛡️ RUSTSEC-2026-0172 — diesel

⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Possible use after free when deserializing a SQLite database via SqliteConnection::deserialize_readonly_database

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.

This vulnerability affects users of SqliteConnection::deserialize_readonly_database who drop the buffer passed to the function before they drop the database connection.

Mitigation

The 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.

Resolution

Diesel 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.

Affected software

RUSTSEC-2026-0172 is recorded against 1 package.

  • diesel

Timeline and source

Published on 5 June 2026 and last revised on 17 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

crates.io (Package)
rustsec.org (Advisory)
github.com (Web)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector N/A
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2026-06-05
Updated 2026-08-12
Modified 2026-07-17
Fix URL N/A

Affected Packages

Software From version Fixed in
diesel

Free Vulnerability Check

Is your site affected by RUSTSEC-2026-0172?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against RUSTSEC-2026-0172 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.