CVE-2022-24845
published 2022-04-13CVE-2022-24845: Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In affected versions, the return of `.returns_int128()` is not validated to fall…
PriorityP346critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
1.38%
69.0th percentile
Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In affected versions, the return of `.returns_int128()` is not validated to fall within the bounds of `int128`. This issue can result in a misinterpretation of the integer value and lead to incorrect behavior. As of v0.3.0, `.returns_int128()` is validated in simple expressions, but not complex expressions. Users are advised to upgrade. There is no known workaround for this issue.
Affected
3 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| vyperlang | vyper | < 0.3.2 | 0.3.2 |
| vyperlang | vyper | >= 0 < 0.3.2 | 0.3.2 |
| vyperlang | vyper | >= 0 < 049dbdc647b2ce838fae7c188e6bb09cf16e470b | 049dbdc647b2ce838fae7c188e6bb09cf16e470b |
CVSS provenance
nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Integer bounds error in Vyper
osv·2022-04-22
CVE-2022-24845 [HIGH] Integer bounds error in Vyper
Integer bounds error in Vyper
### Impact
in the following code, the return of `.returns_int128()` is not validated to fall within the bounds of `int128`. as of v0.3.0, `.returns_int128()` is validated in simple expressions, but not complex expressions.
```vyper
interface iface:
def returns_int128() -> int128: view
def returns_Bytes33() -> Bytes[33]: view
x: iface
@external
def call_out():
x: int128 = self.x.returns_int128() # affected, = 0.3.0, <0.3.2
```
### Patches
0.3.2 (as of https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b)
### Workarounds
Break up operations involving external calls into multiple statements. For instance, instead of the example above, use
```
x: int128 = self.x.returns_int128()
y: uint256 = convert(x, uint256)
```
GHSA
Integer bounds error in Vyper
ghsa·2022-04-22
CVE-2022-24845 [HIGH] CWE-190 Integer bounds error in Vyper
Integer bounds error in Vyper
### Impact
in the following code, the return of `.returns_int128()` is not validated to fall within the bounds of `int128`. as of v0.3.0, `.returns_int128()` is validated in simple expressions, but not complex expressions.
```vyper
interface iface:
def returns_int128() -> int128: view
def returns_Bytes33() -> Bytes[33]: view
x: iface
@external
def call_out():
x: int128 = self.x.returns_int128() # affected, = 0.3.0, <0.3.2
```
### Patches
0.3.2 (as of https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b)
### Workarounds
Break up operations involving external calls into multiple statements. For instance, instead of the example above, use
```
x: int128 = self.x.returns_int128()
y: uint256 = convert(x, uint256)
```
OSV
CVE-2022-24845: Vyper is a pythonic Smart Contract Language for the ethereum virtual machine
osv·2022-04-13
CVE-2022-24845 CVE-2022-24845: Vyper is a pythonic Smart Contract Language for the ethereum virtual machine
Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In affected versions, the return of `.returns_int128()` is not validated to fall within the bounds of `int128`. This issue can result in a misinterpretation of the integer value and lead to incorrect behavior. As of v0.3.0, `.returns_int128()` is validated in simple expressions, but not complex expressions. Users are advised to upgrade. There is no known workaround for this issue.
No detection rules found.
No public exploits indexed.
https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470bhttps://github.com/vyperlang/vyper/security/advisories/GHSA-j2x6-9323-fp7hhttps://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470bhttps://github.com/vyperlang/vyper/security/advisories/GHSA-j2x6-9323-fp7h
2022-04-13
Published