# skiplist library use-after-free from inconsistent comparator

Source: https://junglewise.ai/threats/rustsec-2026-0409-use-after-free-from-a-comparator-that-answers-4329e6ab  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-24. Updated: 2026-10-28  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 4 · Published 2026-10-24

The skiplist Rust library contains a use-after-free vulnerability in its skip list data structures (OrderedSkipList, SkipSet, SkipMap) when using a comparator that gives inconsistent answers. An attacker who controls or influences the comparator logic could trigger memory corruption, potentially leading to data corruption or unauthorized access to sensitive information. This flaw affects any application using skiplist with a stateful or non-deterministic comparator.

Technologies: [skiplist (crates.io)](https://junglewise.ai/threats/technologies/skiplist). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 4, published 24 October 2026.

**Which products and versions are affected?** skiplist (crates.io) SEMVER:introduced=0.0.0-0,fixed=1.3.0; Skiplist before 1.3.0.

**Is there a fix for This vulnerability?** Yes. skiplist (crates.io): upgrade to 1.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network.

**Am I affected?** Check whether you run skiplist (crates.io) or Skiplist at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- skiplist (crates.io): upgrade to 1.3.0 or later

  ```sh
  cargo update -p skiplist
  ```


## Technical details

The vulnerability occurs when a Comparator or Ord implementation answers inconsistently for the same pair of values during mutating operations like insert, remove, take_first, or take. The traversal code records precursor nodes but assumes their links are valid; if a later comparison contradicts an earlier one, the splice code rewires the wrong link and frees a still-linked node, leading to use-after-free (CWE-416). Exploitation requires a stateful or non-deterministic comparator (e.g., one reading a counter, cache, clock, or random source); a pure function cannot trigger it even if non-transitive. The fix detects such contradictions and panics before modifying any links, ensuring the collection remains valid.

## Affected products

- skiplist before 1.3.0

## Identifiers

- GHSA-cc53-p78w-23w9
- RUSTSEC-2026-0409

## Timeline

- 2026-10-24: disclosed
- 2026-10-26: patched: advisory issued

## References

- [https://crates.io/crates/skiplist](https://crates.io/crates/skiplist)
- [https://rustsec.org/advisories/RUSTSEC-2026-0409.html](https://rustsec.org/advisories/RUSTSEC-2026-0409.html)

## Related threats

- [skiplist memory corruption via aliasing violations](https://junglewise.ai/threats/rustsec-2026-0408-aliasing-violations-in-splice-mutable-iteration-and-fecf5294)
- [skiplist use-after-free in clear and retain with panicking Drop](https://junglewise.ai/threats/rustsec-2026-0300-use-after-free-in-clear-and-retain-when-an-element-s-1d3e0c48)
