Classic Buffer Overflow Affecting vyper package, versions [0.3.2,0.4.0)
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.1% (43rd
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PYTHON-VYPER-6179658
- published 19 Jan 2024
- disclosed 18 Jan 2024
- credit cyberthirst
Introduced: 18 Jan 2024
CVE-2024-22419 Open this link in a new tabHow to fix?
Upgrade vyper
to version 0.4.0 or higher.
Overview
vyper is a Pythonic Smart Contract Language for the EVM.
Affected versions of this package are vulnerable to Classic Buffer Overflow via the concat
built-in function. An attacker can alter the contract's intended behavior, that may overwrite valid data, leading to unexpected outcomes.
PoC
@internal
def bar() -> uint256:
sss: String[2] = concat("a", "b")
return 1
@external
def foo() -> int256:
a: int256 = -1
b: uint256 = self.bar()
return a
@external
def __init__():
i = -1
s: String[2] = concat("a", "b")
@external
def foo() -> int256:
return i
References
CVSS Scores
version 3.1