Py-EVM is vulnerable to arbitrary bytecode injection
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."
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | evm-py | <= 0.2.0-alpha\.33 | no fix |
| Python (PyPI) | py-evm | <= 0.2.0a33 | no fix |
References
- https://www.reddit.com/r/ethereum/comments/9vkk2g/netta_labs_claim_to_have_found_a_vulnerability_in/e9d3wyx/
- https://twitter.com/NettaLab/status/1060889400102383617
- https://twitter.com/AlexanderFisher/status/1060923428641878019
- https://github.com/ethereum/py-evm/issues/1448
- https://github.com/advisories/GHSA-vqgp-4jgj-5j64
- https://nvd.nist.gov/vuln/detail/CVE-2018-18920
- https://github.com/ethereum/py-evm
- https://github.com/pypa/advisory-database/tree/main/vulns/evm-py/PYSEC-2018-155.yaml
- https://github.com/pypa/advisory-database/tree/main/vulns/py-evm/PYSEC-2018-96.yaml
- https://www.reddit.com/r/ethereum/comments/9vkk2g/netta_labs_claim_to_have_found_a_vulnerability_in/e9d3wyx
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-119- Platform
- Python (PyPI)
- Package
evm-py, py-evm- Disclosed
- 12.11.2018
- Updated
- 11.10.2026 12:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2018-96 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2018-155 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-vqgp-4jgj-5j64 - CC BY 4.0
Vulnerability history: evm-py
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.