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 package | Versions | Reported by |
|---|---|---|
| ejmahler transpose | before 0.2.3, from 0.1.0 before 0.2.3 | CVE List, NVD |
| transpose (crates.io) | from 0.1.0 before 0.2.3, from 0.0.0-0 before 0.2.3 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| mitre | 4.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L |
| GitHub | 4.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Classification
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
| https://rustsec.org/advisories/RUSTSEC-2023-0080.html | advisory, third-party-advisory, web | |
| https://github.com/ejmahler/transpose/issues/11 | issue-tracking, report, web | |
| https://github.com/advisories/GHSA-5gmm-6m36-r7jh | third-party-advisory | |
| https://crates.io/crates/transpose | package, product | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-53156 | advisory | |
| https://github.com/ejmahler/transpose/commit/c4bcd39fabca9a31a401d0cc42d4090869b5a37a | web | |
| https://github.com/ejmahler/transpose | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-53156 changed 2025-07-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5gmm-6m36-r7jh changed 2025-07-28 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2023-0080 changed 2025-10-28 | CC0-1.0 |
| NVD | CVE-2023-53156 changed 2026-06-17 | Public domain |