RUSTSEC-2026-0409

Source
https://rustsec.org/advisories/RUSTSEC-2026-0409
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0409.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0409
Aliases
  • GHSA-cc53-p78w-23w9
Published
2026-10-24T12:00:00Z
Modified
2026-10-26T14:00:04Z
Severity
  • 6.3 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N CVSS Calculator
Summary
Use-after-free from a comparator that answers inconsistently
Details

OrderedSkipList, SkipSet and SkipMap can free a node that is still linked when a Comparator or Ord implementation gives different answers for the same pair of values during one mutating call. A later call reads the freed memory (CWE-416). A safe impl Ord with the default comparator is enough to reach it.

The mutating traversals record a precursor at each level: the last node whose link points at a node comparing not-Less than the target. The splice code assumes every recorded precursor's link points at or past the final position. If a later comparison reports one of those nodes as Less, the walk steps past it and the assumption breaks. Removals such as take_first, take and remove then rewire the wrong link and free the target while its real predecessor still points at it. insert builds crossed links and wrong skip distances from the same precursors.

A comparator that is a pure function of its two arguments cannot trigger this, even if it is not transitive. The trigger is a stateful or non-deterministic implementation, for example one that reads a counter, a cache, a clock or a random source.

The flaw was corrected in 1.3.0. The mutating traversals track the link target of the lowest recorded precursor and panic with "comparator does not implement a total order" when a Less answer contradicts an earlier one. Every splice site also checks its precursors before the first write. Each detected contradiction panics before any link, value or length changes, so the collection stays valid and safe to drop.

Database specific
{
    "license":  "CC0-1.0"
}
References

Affected packages

crates.io / skiplist

Package

Name
skiplist
View open source insights on deps.dev
Purl
pkg:cargo/skiplist

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
1.3.0

Ecosystem specific

{
    "affected_functions":  null,
    "affects":  {
        "arch":  [],
        "functions":  [],
        "os":  []
    }
}

Database specific

categories
[
    "memory-corruption"
]
cvss
"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
informational
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0409.json"