GHSA-9P8R-4XP4-GW5W
Vyper's `_abi_decode` vulnerable to Memory Overflow
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9P8R-4XP4-GW5W divulgada | |
| Remediación | Parche 0.4.0 | vyper · 115 d desde divulgación | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice |
Summary
If an excessively large value is specified as the starting index for an array in `_abi_decode`, it can cause the read position to overflow. This results in the decoding of values outside the intended array bounds, potentially leading to bugs in contracts that use arrays within `_abi_decode`. The advisory has been assigned low severity, because it is only observable if there is a memory write between two invocations of `abi_decode` on the same input.
Proof of Concept
event Pwn:
pass
@external
def f(x: Bytes[32 * 3]):
a: Bytes[32] = b"foo"
y: Bytes[32 * 3] = x
decoded_y1: Bytes[32] = _abi_decode(y, Bytes[32])
a = b"bar"
decoded_y2: Bytes[32] = _abi_decode(y, Bytes[32])
if decoded_y1 != decoded_y2:
log Pwn()Sending the following calldata results in `Pwn` being emitted.
0xd45754f8
0000000000000000000000000000000000000000000000000000000000000020
0000000000000000000000000000000000000000000000000000000000000060
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0### Patches
Patched in https://github.com/vyperlang/vyper/pull/3925, https://github.com/vyperlang/vyper/pull/4091, https://github.com/vyperlang/vyper/pull/4144, https://github.com/vyperlang/vyper/pull/4060.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypivyper |
Corregida | 0.4.0 | 115 d | 0.4.3 no afectada |
0.4.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://nvd.nist.gov/vuln/detail/CVE-2024-26149https://github.com/vyperlang/vyper/security/advisories/GHSA-9p8r-4xp4-gw5whttps://github.com/vyperlang/vyper/pull/3925https://github.com/vyperlang/vyper/pull/4060https://github.com/vyperlang/vyper/pull/4091https://github.com/vyperlang/vyper/pull/4144https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-164.yamlhttps://github.com/vyperlang/vyperLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
