CVE-2018-18920 Py-EVM is vulnerable to arbitrary bytecode injection
Attackers can cause execution failures in Py-EVM by triggering invalid opcodes, potentially leading to denial of service in Ethereum virtual machine environments.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2018-18920?
CVE-2018-18920 is a high-severity denial of service vulnerability in n/a, published on 12 Nov 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Py-EVM v0.2.0-alpha.33 allows attackers to make a vm.execute_bytecode call that triggers computation._stack.values with '"stack": [100, 100, 0]' where b'\x' was expected, resulting in an execution failure because of an invalid opcode. This is reportedly related to "smart contracts can be executed indefinitely without gas being paid."
Weakness: CWE-119
Which versions are affected by CVE-2018-18920?
4 open source packages ship an affected version, including py-evm and evm-py. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
py-evm PyPI | All versions to 0.2.0a33 | None |
py-evm PyPI | All versions to 0.2.0a33 | None |
py-evm PyPI | All versions | 0.2.0a33 |
evm-py PyPI | All versions to 0.2.0-alpha\.33 | None |
Products include Ethereum Py-Evm.
How do I fix CVE-2018-18920?
Upgrade py-evm to 0.2.0a33 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2018-18920 being exploited?
There is no known exploitation of CVE-2018-18920 in the wild and no public exploit code.
Sources
Also known as GHSA-vqgp-4jgj-5j64, PYSEC-2018-155, PYSEC-2018-96.