CVE-2021-41122 Bounds check missing for decimal args in Vyper

Medium 4.3 Published Updated

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.

PackageAffectedFixed in
vyper PyPIAll versions0.3.0
vyper PyPIAll versions0.3.0
vyper PyPIAll versions0.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.

Sources

Also known as GHSA-c7pr-343r-5c46, PYSEC-2021-366.

Is CVE-2021-41122 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free