cargo package report

Is owned-alloc safe?

1 known vulnerability.

cvss
not scored

severity out of 10

epss
not scored

chance of exploitation in 30 days

xyz score
not scored

CyberXYZ composite out of 10

fig. 01 — RUSTSEC-2026-0291, the advisory selected below

// 1 advisories

RUSTSEC-2026-0291

UNKNOWN

OwnedAlloc::dropinplace destroys the contained value by hand, then commits the ownership transfer with mem::forget(self) — which lives inside intoraw and so runs only after the destruction. T::drop is user code and may panic. If it does, the forget is skipped and the still-live OwnedAlloc unwinds, whose destructor drops the same T a second time and then deallocates. For a T that owns an allocation, the same block is freed twice — a double free (CWE-415). That destructor also reads the already-destroyed value through Layout::forvalue before deallocating, a use-after-free (CWE-416).

MaybeUninitAlloc::dropinplace delegates to the same function, so both public entry points are affected. Storing a value whose Drop can panic and calling either is enough — no unsafe on the caller's side.

// fix

No fixed release is available. The crate has had no release since 2018 and the maintainer has not responded to the report, nor to the one on lockfree, which is published from the same account. forgetinner leaks the value instead of destroying it, which is safe.

Affected
>=0.0.0-0
Fixed in
not stated
Published
2026-09-09, updated 2026-09-21
Sources
osv
// references

// dependencies

0 direct

Create a free accountfor dependency paths and remediation
// ai model usage

Tracked for PyPI packages. HuggingFace models declare Python dependencies, so cargo packages are not covered.


Checked 2026-09-22 at 17:34 UTC. The most recent advisory here was published 2026-09-09. Updated continuously from NVD, GHSA, OSV and CNA feeds.

Think a verdict here is wrong? Tell us — we respond within 2 business days.
Is owned-alloc safe? cargo package security report | CyberXYZ