{"id":"CVE-2023-42460","aliases":["CVE-2023-42460","GHSA-cx2q-hfxr-rj97","PYSEC-2023-191"],"related":[],"kind":"vulnerability","state":"published","title":"_abi_decode input not validated in complex expressions in Vyper","summary":"Vyper is a Pythonic Smart Contract Language for the EVM. The `_abi_decode()` function does not validate input when it is nested in an expression. Uses of `_abi_decode()` can be constructed which allow for bounds checking to be bypassed resulting in incorrect results. This issue has not yet been fixed, but a fix is expected in release `0.3.10`. Users are advised to reference pull request #3626.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vyper is a Pythonic Smart Contract Language for the EVM. The `_abi_decode()` function does not validate input when it is nested in an expression. Uses of `_abi_decode()` can be constructed which allow for bounds checking to be bypassed resulting in incorrect results. This issue has not yet been fixed, but a fix is expected in release `0.3.10`. Users are advised to reference pull request #3626.","source":"cvelist"},{"lang":"en","text":"### Impact\n`_abi_decode()` does not validate input when it is nested in an expression. the following example gets correctly validated (bounds checked):\n```vyper\nx: int128 = _abi_decode(slice(msg.data, 4, 32), int128)\n```\n\nhowever, the following example is not bounds checked\n```vyper\n@external\ndef abi_decode(x: uint256) -> uint256:\n    a: uint256 = convert(_abi_decode(slice(msg.data, 4, 32), (uint8)), uint256) + 1\n    return a  # abi_decode(256) returns: 257\n```\n\nthe issue can be triggered by constructing an example where the output of `_abi_decode` is not internally passed to `make_setter` (an internal codegen routine) or other input validating routine.\n\n### Patches\nhttps://github.com/vyperlang/vyper/pull/3626\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n### References\n_Are there any links users can visit to find out more?_","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vyper es un Pythonic Smart Contract Language para EVM. La función `_abi_decode()` no valida la entrada cuando está anidada en una expresión. Se pueden crear usos de `_abi_decode()` que permitan omitir la verificación de los límites, lo que generará resultados incorrectos. Este problema aún no se ha solucionado, pero se espera que se solucione en la versión `0.3.10`. Se recomienda a los usuarios que hagan referencia al pull request #3626.","source":"nvd"}],"published":"2023-09-26T18:47:09.721Z","modified":"2026-06-17T06:23:52.767Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-682"],"affected":[{"ranges":[{"version":">= 0.3.4, < 0.3.10","status":"affected"}],"vendor":"vyperlang","product":"vyper","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.3.4","status":"affected","fixed":"0.3.10"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.3.4","fixed":"0.3.10"}],"vendor":"vyperlang","product":"vyper","cpe":"cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0.3.4","status":"affected","fixed":"0.3.10"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"pysec"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-cx2q-hfxr-rj97","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/vyperlang/vyper/pull/3626","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-42460","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-191.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-24T13:20:49.007Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-42460","url":"https://www.cve.org/CVERecord?id=CVE-2023-42460","licence":"CVE Terms of Use","modified":"2024-09-24T13:45:05.798Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cx2q-hfxr-rj97","url":"https://github.com/advisories/GHSA-cx2q-hfxr-rj97","licence":"CC-BY-4.0","modified":"2024-11-19T17:33:26.232Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-42460","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-42460","licence":"Public domain","modified":"2026-06-17T06:23:52.767Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2023-191","url":"https://osv.dev/vulnerability/PYSEC-2023-191","licence":"CC-BY-4.0","modified":"2023-11-08T04:13:28.966Z"}],"updatedAt":"2026-11-25T22:58:28.176Z","epss":{"score":0.00671,"percentile":0.53293,"date":"2026-12-01T12:00:22.000Z"}}