CVE-2018-18920 Py-EVM is vulnerable to arbitrary bytecode injection

High 8.8 Published Updated

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.

PackageAffectedFixed in
py-evm PyPIAll versions to 0.2.0a33None
py-evm PyPIAll versions to 0.2.0a33None
py-evm PyPIAll versions0.2.0a33
evm-py PyPIAll versions to 0.2.0-alpha\.33None

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.

Is CVE-2018-18920 in your software?

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

Check your SBOMs for free