Transpose Crate Buffer Overflow Vulnerability in Rust

Vulnerability

A buffer overflow vulnerability has been identified in the Transpose crate for Rust, affecting versions 0.1.0 prior to 0.2.3. The issue arises in the `transpose::transpose` function, where the safety check for the product of `input_width` and `input_height` can be bypassed due to integer overflow. This overflow can cause memory to be written past the end of the output buffer, leading to potential memory corruption. The vulnerability exists only in release mode, as debug mode prevents such overflows from occurring.

Impact

Exploitation of this vulnerability causes a buffer overflow, which can lead to a segmentation fault and memory corruption.

Reproduction

To reproduce this vulnerability, use Transpose crate version 0.2.2. Create a 1D input array and pass it to the `transpose` function along with `input_width` and `input_height` values that will cause the multiplication to overflow. In release mode, this will result in a segmentation fault due to the overflow check being disabled.

Remediation

Users can update to Transpose crate version 0.2.3 or later, where this vulnerability has been patched.

Added: Jul 27, 2025, 9:37 PM
Updated: Jul 27, 2025, 9:37 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.6
exploitability
8.7
remediation
7.7
relevance
0.3
threat
6.4
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.