Skip to content

← Actionable
High, CVSS 7.3

thin-vec: Use-After-Free and Double Free in IntoIter::drop When Element Drop Panics

CVE-2026-6654GHSA-xphw-cqx3-667j

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (thin-vec 0.2.16), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io thin-vec

    Affected
    < 0.2.16
    Fixed in
    0.2.16

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.3 · CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
EPSS
  • CVE-2026-6654: 0.17% estimated exploitation activity in the next 30 days; percentile 6.19 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary A Double Free / Use-After-Free (UAF) vulnerability has been identified in the IntoIter::drop and ThinVec::clear implementations of the thinvec crate. Both vulnerabilities share the same root cause and can trigger memory corruption using only safe Rust code — no unsafe blocks required. Undefined Behavior has been confirmed via Miri and AddressSanitizer (ASAN). --- Details Both vulnerabilities share the same root cause. When a panic occurs during sequential element deallocation, the subsequent length cleanup code (setlen(0)) is never executed. During stack unwinding, the container is dropped again, causing already-freed memory to be re-freed (Double Free / UAF). Vulnerability 1 — IntoIter::drop Location: thin-vec/src/lib.rs L.2308~2314 IntoIter::drop transfers ownership of the internal buffer via mem::replace, then sequentially frees elements via ptr::dropinplace. If a panic occurs during element deallocation, setlennonsingleton(0) is never reached. During unwinding, vec is…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-xphw-cqx3-667j

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-6654

Advisory: thin-vec: Use-After-Free and Double Free in IntoIter::drop When Element Drop Panics
IDs: CVE-2026-6654, GHSA-xphw-cqx3-667j
Record: https://patchnext.com/advisories/cve-2026-6654 (revision 1, source checked 26 Oct 2026, 15:42 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: thin-vec 0.2.16. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io thin-vec: affected < 0.2.16; fixed in 0.2.16

## Suggested inspection (read-only)
- crates.io thin-vec: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on thin-vec.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-xphw-cqx3-667j (GitHub-reviewed advisory GHSA-xphw-cqx3-667j lists affected ranges: crates.io thin-vec >=0 <0.2.16)

Commands are suggestions: review each one before running it.

Loading voting…