{"id":"CVE-2024-26149","aliases":["CVE-2024-26149","GHSA-9p8r-4xp4-gw5w","PYSEC-2024-164"],"related":[],"kind":"vulnerability","state":"published","title":"Vyper _abi_decode Memory Overflow","summary":"Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. 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 exploitations in contracts that use arrays within `_abi_decode`. This vulnerability affects 0.3.10 and earlier versions.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. 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 exploitations in contracts that use arrays within `_abi_decode`. This vulnerability affects 0.3.10 and earlier versions.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIf 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.\n\n## Proof of Concept\n\n```vyper\nevent Pwn:\n    pass\n\n@external\ndef f(x: Bytes[32 * 3]):\n    a: Bytes[32] = b\"foo\"\n    y: Bytes[32 * 3] = x\n\n    decoded_y1: Bytes[32] = _abi_decode(y, Bytes[32])\n    a = b\"bar\"\n    decoded_y2: Bytes[32] = _abi_decode(y, Bytes[32])\n\n    if decoded_y1 != decoded_y2:\n        log Pwn()\n```\n\nSending the following calldata results in `Pwn` being emitted. \n\n```\n0xd45754f8\n0000000000000000000000000000000000000000000000000000000000000020\n0000000000000000000000000000000000000000000000000000000000000060\nffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0\n```\n\n### Patches\nPatched 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vyper es un lenguaje de contrato inteligente pitónico para la máquina virtual ethereum. Si se especifica un valor excesivamente grande como índice inicial para una matriz en `_abi_decode`, puede provocar que la posición de lectura se desborde. Esto da como resultado la decodificación de valores fuera de los límites previstos de la matriz, lo que potencialmente conduce a explotaciones en contratos que usan matrices dentro de `_abi_decode`. Esta vulnerabilidad afecta a la versión 0.3.10 y versiones anteriores.","source":"nvd"}],"published":"2024-02-26T20:11:07.000Z","modified":"2026-06-17T07:17:12.147Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-119","CWE-120"],"affected":[{"ranges":[{"version":"<= 0.3.10","status":"affected"}],"vendor":"vyperlang","product":"vyper","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","lastAffected":"0.3.10","status":"affected"}],"vendor":"vyperlang","product":"vyper","cpe":"cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.4.0"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"0.3.10"}],"vendor":"vyperlang","product":"vyper","cpe":"cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.4.0b1"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"pysec"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-9p8r-4xp4-gw5w","tags":["advisory","evidence","exploit","fix","patch","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26149","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper/pull/3925","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper/pull/4060","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper/pull/4091","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper/pull/4144","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-164.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-9p8r-4xp4-gw5w","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-02-27T15:58:20.730Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-26149","url":"https://www.cve.org/CVERecord?id=CVE-2024-26149","licence":"CVE Terms of Use","modified":"2024-08-22T20:44:05.129Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9p8r-4xp4-gw5w","url":"https://github.com/advisories/GHSA-9p8r-4xp4-gw5w","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:15.814Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-26149","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26149","licence":"Public domain","modified":"2026-06-17T07:17:12.147Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-164","url":"https://osv.dev/vulnerability/PYSEC-2024-164","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:18.967Z"}],"updatedAt":"2026-11-25T22:58:37.067Z","epss":{"score":0.00542,"percentile":0.47003,"date":"2026-12-01T12:00:22.000Z"}}