Use After Free Vulnerability in Diesel Package: SQLite Database Deserialization Issue

diesel Updated 17 Jul 2026

Summary

16/07/2026
MODERATE
Yes i
Moderate
6.9

GHSA-ggxf-9f6j-w742: Diesel allows loading a SQLite database from a byte buffer, represented as &[u8], at runtime via the SqliteConnection::deserialize_readonly_database function. Affects diesel versions < 2.3.10. Fixed in 2.3.10. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Diesel is a powerful Rust-based ORM (Object-Relational Mapping) library that facilitates interaction with databases in a type-safe manner. It supports various backends, including SQLite, and allows developers to perform complex queries while maintaining Rust's safety guarantees. However, a vulnerability has been identified in the way Diesel handles SQLite database deserialization, which could lead to serious memory management issues.

Vulnerability Detail

The vulnerability arises from Diesel's SqliteConnection::deserialize_readonly_database function, which allows loading a SQLite database from a byte buffer at runtime. In earlier versions, this buffer was passed directly to libsqlite3 without ensuring its lifetime, leading to a use-after-free scenario. If the buffer is dropped prematurely while the database connection is still active, libsqlite3 may attempt to access freed memory, potentially causing crashes or undefined behavior. This vulnerability affects users who do not manage the buffer's lifetime correctly.

How To Fix

Latest published version: 2.3.14 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.10

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, ensure that the byte buffer passed to SqliteConnection::deserialize_readonly_database remains alive for the entire duration of the database connection. This can be done by storing the buffer in a variable that is not dropped until the connection is closed.

Conclusion

In summary, the Diesel package has a use-after-free vulnerability related to SQLite database deserialization. Users are advised to update to version 2.3.10 or newer to mitigate the risk. Proper management of the byte buffer's lifetime is crucial to prevent potential memory issues.

See every vulnerability recorded for diesel →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 6.9, indicating a moderate severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.

If left unaddressed, this vulnerability could lead to crashes or undefined behavior in your application due to memory access violations.

Yes, you should upgrade to Diesel version 2.3.10 or newer to mitigate this vulnerability.

The function affected is SqliteConnection::deserialize_readonly_database, which is used to load a SQLite database from a byte buffer.

Related vulnerabilities

Recent vulnerabilities recorded for diesel.

How To Fix

Latest published version: 2.3.14 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.10

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback