CVE-2023-53156
JSON

4.5medium

transpose: Buffer overflow due to integer overflow

Severity
4.5medium CVSS:3.1 by mitre
Exploit likelihood
0.34% (higher than 30% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-5gmm-6m36-r7jhRUSTSEC-2023-0080

Description

The transpose crate before 0.2.3 for Rust allows an integer overflow via input_width and input_height arguments.

Affected

Product or packageVersionsReported by
ejmahler transposebefore 0.2.3, from 0.1.0 before 0.2.3CVE List, NVD
transpose (crates.io)from 0.1.0 before 0.2.3, from 0.0.0-0 before 0.2.3GitHub Advisory Database, RustSec Advisory Database

All scores

mitre4.5medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L
GitHub4.5medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-120CWE-190

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

The transpose crate before 0.2.3 for Rust allows an integer overflow via input_width and input_height arguments.

GitHub Advisory Database

Given the function transpose::transpose:

fn transpose<T: Copy>(input: &[T], output: &mut [T], input_width: usize, input_height: usize)

The safety check input_width * input_height == output.len() can fail due to input_width * input_height overflowing in such a way that it equals output.len(). As a result of failing the safety check, memory past the end of output is written to. This only occurs in release mode since * panics on overflow in debug mode.

Exploiting this issue requires the caller to pass input_width and input_height arguments such that multiplying them overflows, and the overflown result equals the lengths of input and output slices.

NVD (es)

El paquete de transpose para Rust anterior a la versión 0.2.3 permite un desbordamiento de enteros a través de los argumentos input_width y input_height.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-53156 changed 2025-07-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-5gmm-6m36-r7jh changed 2025-07-28CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2023-0080 changed 2025-10-28CC0-1.0
NVDCVE-2023-53156 changed 2026-06-17Public domain