{"id":"CVE-2023-32058","published":"2023-05-11T20:55:35Z","modified":"2025-01-24T15:57:47Z","title":"Vyper vulnerable to integer overflow in loop","vendor":"vyperlang","product":"vyper","tier":"tail","description":{"text":"Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Prior to version 0.3.8, due to missing overflow check for loop variables, by assigning the iterator of a loop to a variable, it is possible to overflow the type of the latter. The issue seems to happen only in loops of type `for i in range(a, a + N)` as in loops of type `for i in range(start, stop)` and `for i in range(stop)`, the compiler is able to raise a `TypeMismatch` when trying to overflow the variable. The problem has been patched in version 0.3.8.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00962,"percentile":0.6021,"provenance":"source"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-6r8q-pfpv-7cgj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vyperlang/vyper/commit/3de1415ee77a9244eb04bdb695e249d3ec9ed868","tags":["x_refsource_MISC"]}],"priority":{"score":17.3,"factors":[{"name":"EPSS percentile","points":12.04},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"vyperlang","affectedVersions":[{"vendor":"vyperlang","product":"vyper","versions":["< 0.3.8"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-01-24T15:56:37.269120Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vyper","vulnerableRanges":["<0.3.8"],"patched":["0.3.8"],"from":["GHSA-6r8q-pfpv-7cgj","PYSEC-2023-78"],"provenance":"source"}],"summary":{"text":"The Vyper smart contract language (vyperlang/vyper) contains an integer overflow flaw in loop handling: in versions before 0.3.8, the compiler lacks an overflow check when a loop iterator is assigned to a variable, so that variable's type can overflow, and the issue appears specifically in loops written as for i in range(a, a + N). An attacker can trigger the overflow over the network without authentication or user interaction, provided the vulnerable loop form is present in the compiled contract code.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:43:04Z"},"euvd":{"id":"EUVD-2023-0271","exploited":false,"provenance":"source"}}