# CVE-2023-31146: Vyper vulnerable to OOB DynArray access when array is on both LHS and RHS of an assignment

- 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:H/A:N`
- 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): 1.25%, higher than 70% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-05-11T20:51:51.666Z
- Modified: 2026-09-10T03:49:54.489Z
- Also known as: GHSA-3p37-3636-q8wv, PYSEC-2023-77
- Weaknesses: CWE-787
- 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, during codegen, the length word of a dynarray is written before the data, which can result in out-of-bounds array access in the case where the dynarray is on both the lhs and rhs of an assignment. The issue can cause data corruption across call frames. The expected behavior is to revert due to out-of-bounds array access. Version 0.3.8 contains a patch for this issue.

(As written by CVE List.)

## Affected

- vyperlang vyper: < 0.3.8; before 0.3.8
- vyper (PyPI): before 0.3.8; before 4f8289a81206f767df1900ac48f485d90fc87edb

## 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:H/A:N`
- CISA-ADP: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/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:H/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`

## References

- <https://github.com/vyperlang/vyper/security/advisories/GHSA-3p37-3636-q8wv> (exploit, advisory, vendor-advisory, web)
- <https://github.com/vyperlang/vyper/commit/4f8289a81206f767df1900ac48f485d90fc87edb> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-31146> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-77.yaml> (web)
- <https://github.com/vyperlang/vyper> (package)

## Sources

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

---

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