CVE-2023-46247
published high CVSS 3.1 · 7.5Vyper has incorrect storage layout for contracts containing large arrays
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| vyperlang | — | vyper< 0.3.8 | Affected | Not stated | GitHub_M |
Description
Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). Contracts containing large arrays might underallocate the number of slots they need by 1. Prior to v0.3.8, the calculation to determine how many slots a storage variable needed used `math.ceil(type_.size_in_bytes / 32)`. The intermediate floating point step can produce a rounding error if there are enough bits set in the IEEE-754 mantissa. Roughly speaking, if `type_.size_in_bytes` is large (> 2**46), and slightly less than a power of 2, the calculation can overestimate how many slots are needed by 1. If `type_.size_in_bytes` is slightly more than a power of 2, the calculation can underestimate how many slots are needed by 1. This issue is patched in version 0.3.8.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| vyperlang | vyper | < 0.3.8 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-193 CWE-193: Off-by-one Error
- CWE-682 CWE-682: Incorrect Calculation
References
3Provider assertions
2GitHub_M · cna
Vyper has incorrect storage layout for contracts containing large arrays
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 9306716de313378755730671406624e508e063fc970dbdfc81a319779cdec5e0
- Ingested
- 23 Sep 2026, 08:12:41 UTC
- Source record
- Official CVE record