CVE-2020-25793: sized-chunks - Array Size Not Checked in Sized-Chunks

sized-chunks Updated 02 Oct 2025

Summary

25/08/2021
Yes i
High
7.5

CVE-2020-25791: Array size is not checked in sized-chunks. Affects sized-chunks versions < 0.6.3. Fixed in 0.6.3. How to fix ↓

Also tracked for

The same CVE-2020-25791 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

sized-chunks is a crate for Rust that provides a Chunk implementation. It allows for the construction of chunks with a specific size. The Chunk implementation is used to manage arrays of elements. However, in versions up to 0.6.2, the array size is not properly checked when constructed with From<InlineArray<A, T>>.

Vulnerability Detail

The vulnerability (CVE-2020-25793) in sized-chunks arises from the lack of array size validation in the Chunk implementation. This oversight can lead to potential memory corruption or buffer overflow issues. An attacker could exploit this vulnerability to execute arbitrary code, cause a denial of service, or gain unauthorized access to sensitive information. The vulnerability has a CVSS score of 7.5, indicating a high severity level.

How To Fix

Latest published version: 0.7.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.6.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a workaround, developers can manually validate the array size before constructing a Chunk object. Here is an example of how to perform the size check:

use sized_chunks::Chunk;

fn create_chunk<T>(data: &[T]) -> Chunk<T> {
    assert!(data.len() <= Chunk::<T>::MAX_SIZE);
    Chunk::from(data)
}

Conclusion

In conclusion, the sized-chunks crate for Rust is vulnerable to an array size validation issue. This vulnerability can have severe consequences, including memory corruption and unauthorized access. It is crucial to update the crate to version 0.6.3 or later to mitigate the vulnerability. For further assistance with vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for sized-chunks →

Share this vulnerability

FAQ

sized-chunks is a crate for Rust that provides a Chunk implementation used to manage arrays of elements with a specific size.

The vulnerability in sized-chunks can lead to memory corruption, buffer overflow, arbitrary code execution, denial of service, or unauthorized access to sensitive information.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

To fix this vulnerability, update the sized-chunks crate to version 0.6.3 or later by modifying the Cargo.toml file and running 'cargo update' command.

Yes, developers can manually validate the array size before constructing a Chunk object. Refer to the 'workaround' section for an example.

Related vulnerabilities

Recent vulnerabilities recorded for sized-chunks.

How To Fix

Latest published version: 0.7.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.6.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback