CVE-2022-24787
HIGH 7.5CVSS 3.1Incorrect Comparison in Vyper
Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. In version 0.3.1 and prior, bytestrings can have dirty bytes in them, resulting in the word-for-word comparisons giving incorrect results. Even without dirty nonzero bytes, two bytestrings can compare to equal if one ends with "\x00" because there is no comparison of the length. A patch is available and expected to be part of the 0.3.2 release. There are currently no known workarounds.
- Published
- 4 Apr 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-697
- Also known as
- GHSA-7vrm-3jc8-5wwmPYSEC-2022-196
- Sources
- NVDJSONOSV GHSA-7vrm-3jc8-5wwmJSONOSV PYSEC-2022-196JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vyperlang | vypercpe:2.3:a:vyperlang:vyper:*:*:*:*:*:*:*:* |
<= 0.3.1 | |
| OSV | PyPI | vyper | < 0.3.2 | 0.3.2 |
References
- https://github.com/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwm · Patch, Third Party Advisory, WEB, ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-196.yaml · WEB
- https://github.com/vyperlang/vyper · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 4 Apr 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 4 Apr 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 4 Apr 2022)