tinyvec is vulnerable to Uncontrolled Resource Consumption
39
Low Risk
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.
You are affected if you are using a version that falls within the vulnerable range and deserialize untrusted borsh input into a TinyVec.
tinyvec is vulnerable to Uncontrolled Resource Consumption in versions 1.9.0 - 1.11.0.
Upgrade the tinyvec library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant