PT-2022-16879 · Vyper · Vyper
Charles-Cooper
·
Published
2022-04-04
·
Updated
2023-08-02
·
CVE-2022-24787
CVSS v3.1
7.5
High
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Name of the Vulnerable Software and Affected Versions
Vyper versions 0.3.1 and prior
Description
The issue arises from the comparison of bytestrings, which can yield incorrect results due to the presence of dirty bytes or the lack of length comparison. Specifically, two bytestrings can compare as equal even if one ends with a null byte (
x00) because the comparison does not account for the length of the bytestrings. This can lead to incorrect evaluations, such as b1 == b2 returning True when b1 and b2 are not identical.Recommendations
For Vyper versions 0.3.1 and prior, update to version 0.3.2 or later, which is expected to include the patch for this issue.
At the moment, there is no information about other workarounds for this vulnerability.
Exploit
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Vyper