vyper: Incorrect Comparison
CVE-2022-24787 is a high-severity incorrect comparison vulnerability in vyper from Vyperlang, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected vyper versions: <= 0.3.1. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.03% chance of exploitation within 30 days, higher than 64% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of vyper you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (github.com) |
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 2.0 | 5.0 | Medium | NVD |
Official description
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwmThird Party Advisory
Patches and release notes
- github.com/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508Third Party Advisory
Other vulnerabilities in vyper
- 8.4 High severity
- 7.5 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 7.5 High severity
Recent Incorrect Comparison vulnerabilities
- 8.8 High severity
- 7.5 High severity
Unraid Authentication Bypass Exploited
Spotted an error? Tell us.