CVE-2023-31146
CRITICAL 9.1CVSS 3.1Vyper vulnerable to OOB DynArray access when array is on both LHS and RHS of an assignment
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.
- Published
- 11 May 2023
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-787
- Also known as
- GHSA-3p37-3636-q8wvPYSEC-2023-77
- Sources
- NVDJSONOSV GHSA-3p37-3636-q8wvJSONOSV PYSEC-2023-77JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vyperlang | vypercpe:2.3:a:vyperlang:vyper:*:*:*:*:*:*:*:* |
< 0.3.8 | 0.3.8 |
| OSV | PyPI | vyper | < 0.3.8 | 0.3.8 |
References
- https://github.com/vyperlang/vyper/commit/4f8289a81206f767df1900ac48f485d90fc87edb · Patch, WEB, FIX
- https://github.com/vyperlang/vyper/security/advisories/GHSA-3p37-3636-q8wv · Exploit, Vendor Advisory, WEB, ADVISORY
- 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
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 11 May 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 11 May 2023)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 12 May 2023)