{"id":"GHSA-q8x8-jrhj-fh9p","aliases":["RUSTSEC-2026-0137"],"url":"https://o3.security/vulnerability/GHSA-q8x8-jrhj-fh9p","summary":"Diesel: Possible unaligned data access for implementations of `SqliteAggregate`","details":"Diesel allows to register custom aggregate SQL functions for SQLite via the `SqliteAggregate` interface.\n\nTo store an instance of the custom aggregate processor Diesel relied on the `sqlite3_aggregate_context` function provided by sqlite. This function doesn't provide any guarantees about alignment of the returned allocation, which in turn can lead to problems if the type implementing requires a special alignment, e.g. via a custom `#[align(x)]` attribute on the type implementing this trait. This affects any user of `SqliteAggregate` that registers the custom aggregate function with an SQLite connection, while using a non-standard alignment on the type implementing this trait.\n\n## Mitigation\n\nThe preferred mitigation to the outlined problem is to update to a Diesel version 2.3.8 or newer, which includes fixes for the problem.\n\n## Resolution\n\nDiesel now allocates the corresponding memory on Rust side to get a correctly aligned allocation.","published":"2026-05-19T19:39:37Z","modified":"2026-05-20T07:26:23.800095769Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"diesel","fixedVersion":"2.3.8"}],"fix":{"url":"https://github.com/diesel-rs/diesel/pull/5042","label":"diesel-rs/diesel#5042"},"references":[{"type":"WEB","url":"https://github.com/diesel-rs/diesel/pull/5042"},{"type":"PACKAGE","url":"https://github.com/diesel-rs/diesel"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2026-0137.html"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-05-20T07:26:23.800095769Z"}}