Loading advisory.
Loading advisory.
Unsound transmute while debug/display printing batch Insert statements in Diesel's SQLite backend
Diesel allows users to output the generated SQL for any query DSL construct via th diesel::debug_query function as Display and Debug output.
Published 2026-04-24 12:00 UTC · Modified 2026-05-13 14:30 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected |
|---|
| Fixed in |
|---|
| Upgrade command |
|---|
| diesel | crates.io | >= 0.0.0-0, < 2.3.8 | 2.3.8 | cargo add diesel@2.3.8 |
|---|
Diesel allows users to output the generated SQL for any query DSL construct via th diesel::debug_query function as Display and Debug output.
For the particular implementation used by batch Insert statements in the SQLite backend Diesel relied on an unspecified transmute between types with a #[repr(rust)] layout. This is formally undefined behaviour as the compiler is free to change the layout of these types at any time.
This vulnerability affects users that print out batch insert statements constructed using an array/vector of values without default values using diesel::debug_query on the SQLite backend.
The preferred mitigation to the outlined problem is to update to Diesel version 2.3.8 or newer, which includes fixes for the problem.
Diesel now uses a sound cast instead.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
No EPSS history yet. Either the CVE has no score or the scores have not been fetched.