CVE-2023-53156: transpose Buffer Overflow Due To Integer Vulnerability
MODERATECVE-2023-53156 is a MODERATE (CVSS 4.5) buffer overflow due to integer vulnerability (CWE-190: Integer Overflow or Wraparound) affecting transpose libraries in the crates.io ecosystem. The issue involves buffer overflow due to integer overflow. Remediation is available by upgrading affected packages to version 0.2.3.
CVE-2023-53156 at a Glance
Security Impact
CVSS: 4.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L).
How to Fix CVE-2023-53156
To remediate this vulnerability, upgrade all affected transpose dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade transpose to 0.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for transpose
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-53156, inspect your project dependencies for transpose:
inspect dependencies for transpose
Analyze the terminal output to locate any version of transpose in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In transpose, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-53156 Affected transpose Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
transpose
|
crates.io |
≥ 0.1.0
< 0.2.3
|
0.2.3
|
References
Frequently Asked Questions
What is CVE-2023-53156?
Which transpose versions are affected?
What version fixes CVE-2023-53156?
Is transpose affected?
What is the CVSS score of CVE-2023-53156?
What CWE is associated with CVE-2023-53156?
How can I check crates.io dependencies for CVE-2023-53156?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5gmm-6m36-r7jh",
"modified" : "2025-07-28T15:54:18Z",
"published" : "2024-04-05T15:41:34Z",
"aliases" : [ "CVE-2023-53156" ],
"summary" : "transpose: Buffer overflow due to integer overflow",
"details" : "Given the function `transpose::transpose`:\n```rust\nfn transpose<T: Copy>(input: &[T], output: &mut [T], input_width: usize, input_height: usize)\n```\n\nThe 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()`.\nAs 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.\n\nExploiting 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "transpose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.0"
}, {
"fixed" : "0.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-53156"
}, {
"type" : "WEB",
"url" : "https://github.com/ejmahler/transpose/issues/11"
}, {
"type" : "WEB",
"url" : "https://github.com/ejmahler/transpose/commit/c4bcd39fabca9a31a401d0cc42d4090869b5a37a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ejmahler/transpose"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0080.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-120", "CWE-190" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-05T15:41:34Z",
"nvd_published_at" : null
}
}