Security mailing lists by PureSourceCode

RUSTSEC-2026-0137

MEDIUM

Diesel: Possible unaligned data access for implementations of `SqliteAggregate`

Diesel allows to register custom aggregate SQL functions for SQLite via the SqliteAggregate interface.

To 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.

Mitigation

The preferred mitigation to the outlined problem is to update to a Diesel version 2.3.8 or newer, which includes fixes for the problem.

Resolution

Diesel now allocates the corresponding memory on Rust side to get a correctly aligned allocation.

Published
24 Apr 2026
Last modified
20 May 2026
Weakness
CWE-188
Also known as
GHSA-q8x8-jrhj-fh9p
Sources
OSV GHSA-q8x8-jrhj-fh9pJSONOSVJSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 4.0 CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io diesel < 2.3.8 2.3.8
OSV crates.io diesel >= 0.0.0-0, < 2.3.8 2.3.8

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Apr 2026)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 19 May 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.