# CVE-2023-32058: Vyper vulnerable to integer overflow in loop

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.91%, higher than 61% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-05-11T20:55:35.195Z
- Modified: 2026-09-10T03:50:01.254Z
- Also known as: GHSA-6r8q-pfpv-7cgj, PYSEC-2023-78
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- vyperlang vyper: < 0.3.8; before 0.3.8
- vyper (PyPI): before 0.3.8; before 3de1415ee77a9244eb04bdb695e249d3ec9ed868

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/vyperlang/vyper/security/advisories/GHSA-6r8q-pfpv-7cgj> (exploit, advisory, vendor-advisory, web)
- <https://github.com/vyperlang/vyper/commit/3de1415ee77a9244eb04bdb695e249d3ec9ed868> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-32058> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-78.yaml> (web)
- <https://github.com/vyperlang/vyper> (package)

## Sources

- CVE List: [CVE-2023-32058](https://www.cve.org/CVERecord?id=CVE-2023-32058), CVE Terms of Use, modified 2025-01-24
- GitHub Advisory Database: [GHSA-6r8q-pfpv-7cgj](https://github.com/advisories/GHSA-6r8q-pfpv-7cgj), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-32058](https://nvd.nist.gov/vuln/detail/CVE-2023-32058), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-78](https://osv.dev/vulnerability/PYSEC-2023-78), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2023-32058 · Whole record: https://cve.day/CVE-2023-32058.json · Rebuilt by cve.day 2026-11-25T22:58:24.109Z
