Intel

AIKIDO-2026-673528

tinyvec is vulnerable to Uncontrolled Resource Consumption

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 15, 2026
July 15, 2026

39

CVE Score

Low

Uncontrolled Resource Consumption

Are you affected? Scan for Free

TL;DR

The borsh BorshDeserialize implementation for TinyVec reads an attacker-controlled length prefix and passes it straight to with_capacity, eagerly preallocating memory before a single element is read. A hostile length value forces a huge allocation that can exhaust memory and abort the process, causing a denial of service. The fix adds a cautious_capacity helper that caps the initial reservation to a small byte budget and lets the container grow via push as real elements arrive. The same cap is applied to the bin-proto decode and serde sequence size-hint allocation paths.

How do I fix this?

Upgrade the tinyvec library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and deserialize untrusted borsh input into a TinyVec.

Package

Versions

1.9.0 - 1.11.0

Fixed in 1.12.0

Background info

tinyvec is vulnerable to Uncontrolled Resource Consumption in versions 1.9.0 - 1.11.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea