PyPI: eth-abi
GHSA-3qwc-47jf-5rf7
Safety vulnerability ID: SFTY-20240423-45725
Safety legacy ID: pyup.io-68474
Ethereum ABI (Application Binary Interface) library versions before 5.0.1 are susceptible to a vulnerability due to a recursive pointer issue. This flaw can trigger an OverflowError when decoding specially crafted payloads. The vulnerability specifically arises when attempting to decode deep nested arrays encoded in hex, as demonstrated by inputs causing Python integers to exceed the size that can be converted to C ssize_t. This issue underscores the importance of carefully handling array decoding to prevent potential overflows, emphasizing the need for appropriate validation and error handling mechanisms in applications processing such data.
Overview
eth-abi is vulnerable to recursive DoS
Advisory
Ethereum ABI (Application Binary Interface) library versions before 5.0.1 are susceptible to a vulnerability due to a recursive pointer issue. This flaw can trigger an OverflowError when decoding specially crafted payloads. The vulnerability specifically arises when attempting to decode deep nested arrays encoded in hex, as demonstrated by inputs causing Python integers to exceed the size that can be converted to C ssize_t. This issue underscores the importance of carefully handling array decoding to prevent potential overflows, emphasizing the need for appropriate validation and error handling mechanisms in applications processing such data.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20240423-45725
- https://github.com/ethereum/eth-abi/security/advisories/GHSA-3qwc-47jf-5rf7
- https://github.com/ethereum/eth-abi/commit/82c1ad37a866472562d81fedaef0f4fed0a08269
- https://github.com/ApeWorX/eth-abi/pull/226
- https://github.com/advisories/GHSA-3qwc-47jf-5rf7
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
