CVE-2021-41121 Memory corruption in Vyper

High 7.5 Published Updated

A memory corruption flaw in the Vyper compiler allows attackers to potentially execute arbitrary code via crafted smart contracts.

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-41121?

CVE-2021-41121 is a high-severity memory corruption vulnerability in vyperlang vyper, published on 6 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 when performing a function call inside a literal struct, there is a memory corruption issue that occurs because of an incorrect pointer to the the top of the stack. This issue has been resolved in version 0.3.0.

Weakness: CWE-119

Which versions are affected by CVE-2021-41121?

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-41121?

Upgrade vyper to 0.3.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-41121 being exploited?

There is no known exploitation of CVE-2021-41121 in the wild and no public exploit code.

Sources

Also known as GHSA-xv8x-pr4h-73jv, PYSEC-2021-365.

Is CVE-2021-41121 in your software?

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

Check your SBOMs for free