CVE-2021-41122 Bounds check missing for decimal args in Vyper
Missing bounds checks on decimal arguments in Vyper external functions can lead to logic errors and incorrect contract behavior.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-41122?
CVE-2021-41122 is a medium-severity vulnerability in vyperlang vyper, published on 5 Oct 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Vyper is a Pythonic Smart Contract Language for the EVM. In affected versions external functions did not properly validate the bounds of decimal arguments. The can lead to logic errors. This issue has been resolved in version 0.3.0.
Weakness: CWE-682
Which versions are affected by CVE-2021-41122?
3 open source packages ship an affected version, including vyper. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vyper PyPI | All versions | 0.3.0 |
vyper PyPI | All versions | 0.3.0 |
vyper PyPI | All versions | 0.3.0 |
Products include Vyperlang Vyper.
How do I fix CVE-2021-41122?
Upgrade vyper to 0.3.0 or later.
Is CVE-2021-41122 being exploited?
There is no known exploitation of CVE-2021-41122 in the wild and no public exploit code.
Other vulnerabilities in vyperlang vyper
- CVE-2024-24563 Vyper array negative index vulnerability
- CVE-2024-24561 Vyper bounds check on built-in `slice()` function can be overflowed
- CVE-2023-39363 Vyper incorrectly allocated named re-entrancy locks
- CVE-2022-24845 Integer bounds error in Vyper
- CVE-2022-29255 Multiple evaluation of contract address in call in vyper
Sources
Also known as GHSA-c7pr-343r-5c46, PYSEC-2021-366.