Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. diesel
  4. ›
  5. GHSA-ggxf-9f6j-w742

GHSA-ggxf-9f6j-w742: Diesel has possible use after free when deserializing a SQLite database via `SqliteConnection::deserialize_readonly_database`

July 16, 2026

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.

References

  • github.com/advisories/GHSA-ggxf-9f6j-w742
  • github.com/diesel-rs/diesel/commit/1bc2ea46d9840e8d9af844239d3c84f37fe7d84b
  • rustsec.org/advisories/RUSTSEC-2026-0172.html

Code Behaviors & Features

Detect and mitigate GHSA-ggxf-9f6j-w742 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.3.10

Fixed versions

  • 2.3.10

Solution

Upgrade to version 2.3.10 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-416: Use After Free

Source file

cargo/diesel/GHSA-ggxf-9f6j-w742.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:19:20 +0000.