All reports
Medium

insert_slice_clone can double drop if Clone panics.

Affected versions

Version ranges need review.

Rust / Cargoqwutils
Affected versions
>=0.0.0-0 <0.3.1
Fixed version
0.3.1
Rust / Cargoqwutils
Affected versions
< 0.3.1
Fixed version
0.3.1

Exploitation

CVE-2021-26954

Probability of exploitation in the next 30 days: 1.38%

FIRST EPSS · 2026-11-21

Description

Affected versions of this crate used ptr::copy when inserting into the middle of a Vec. When ownership was temporarily duplicated during this copy, it calls the clone method of a user provided element.

This issue can result in an element being double-freed if the clone call panics.

Commit 20cb73d fixed this issue by adding a set_len(0) call before operating on the vector to avoid dropping the elements during a panic.

Links