CVE-2022-24787 json
Incorrect Comparison in Vyper
published 4y ago modified 4mo ago also GHSA-7vrm-3jc8-5wwm , PYSEC-2022-196 , EUVD-2022-0353
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.0%
- EPSS 1.0% chance of exploitation in 30 days, percentile 63%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi vyper 0.3.2
Is CVE-2022-24787 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- last yr.
Exploit prediction
1.03% chance of exploitation in the next 30 days, higher than 63% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | vyper | <0.3.2 |
0.3.2 |
Affected products
- vyperlang vyper
Classification
- Weakness
-
- CWE-697 Incorrect Comparison
References
-
github.com
/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508
web, patch, third-party-advisory
-
github.com
/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwm
web, patch, third-party-advisory, advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-196.yaml
web
-
github.com
/vyperlang/vyper
package
Sources
- CVE List CVE-2022-24787
- GitHub Advisory GHSA-7vrm-3jc8-5wwm
- NVD CVE-2022-24787
- OSV PYSEC-2022-196
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.