Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Medium severity, with a CVSS score of 6.3, published 19 May 2026.
- Which products and versions are affected?
- diesel (crates.io) < 2.3.8.
- Is there a fix for This vulnerability?
- A patch was published on 2026-05-19: Version 2.3.8 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run diesel (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The vulnerability exists in the `SqliteAggregate` interface where Diesel relied on the `sqlite3_aggregate_context` function from the SQLite C API to allocate memory for custom aggregate processors. This SQLite function does not guarantee memory alignment, which violates Rust's safety requirements when the implementing type requires specific alignment (e.g., via `#[repr(align(x))]`). Creating a Rust reference to unaligned memory is considered undefined behavior (UB). An attacker who can influence the execution of these custom aggregate functions might trigger memory corruption or crashes. The issue is resolved in version 2.3.8 by moving the allocation to the Rust side to ensure proper alignment.
Affected products
- diesel-rs diesel < 2.3.8
Timeline
- 2026-04-24: other: Issue reported and pull request created
- 2026-05-19: advisory: GitHub Advisory published
- 2026-05-19: patched: Version 2.3.8 released