Vulnerability MediumRUSTSEC-2025-0054 · array-queue
RUSTSEC-2025-0054: ArrayQueue::push_front is not panic-safe
Short answerA security vulnerability in the array-queue crate: ArrayQueue::push_front is not panic-safe. GitHub rates it Medium. Fixed in 0.4.0: update to a fixed version.
| Crate | array-queue |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | From 0.3.0 before 0.4.0. |
| Fixed in | 0.4.0 |
| Severity | Medium (GitHub rating) |
| Published | 2025-08-14 |
| Last changed | 2025-10-28 |
| Also known as | GHSA-xqjr-wfx3-gmxv |
| Affected functions | array_queue::ArrayQueue::push_front |
What to do
- See which version you have:
cargo tree -i array-queue(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p array-queue. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplearray-queue = "0.4.0") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
The safe API array_queue::ArrayQueue::push_front can lead to deallocating uninitialized memory if a panic occurs while invoking the clone method on the passed argument.
Specifically, push_front receives an argument that is intended to be cloned and pushed, whose type implements the Clone trait. Furthermore, the method updates the queue's start index before initializing the slot for the newly pushed element. User-defined implementations of Clone may include a clone method that can panic. If such a panic occurs during initialization, the structure is left with an advanced start index pointing to an uninitialized slot. When ArrayQueue is later dropped, its destructor treats that slot as initialized and attempts to drop it, resulting in an attempt to free uninitialized memory.
The bug was fixed in commit 728fe1b.
References
- Package: crates.io/crates/array-queue
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0054.html
- Report: github.com/raviqqe/array-queue/issues/3
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for array-queue
Up next
Same cratearray-queue: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?