CVE-2024-24563
Vyper array negative index vulnerability
Also known as GHSA-52xq-j7v9-v4v2, PYSEC-2024-150
Mitigation
- Upgrade vyper to one of 0.4.0, 0.4.0b1 (or later in the same release line).
Who should check
- Projects that depend on PyPI package vyper (< 0.4.0)
- Anyone running vyperlang vyper <= 0.3.10
Vulnerability facts
- Affected
- vyper < 0.4.0
- Fixed in
- 0.4.0, 0.4.0b1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 1.24% chance of exploitation in 30 days (percentile 69, 2026-11-26)
- CWE
- CWE-129
- Modified
Description
Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. Arrays can be keyed by a signed integer, while they are defined for unsigned integers only. The typechecker doesn't throw when spotting the usage of an `int` as an index for an array. The typechecker allows the usage of signed integers to be used as indexes to arrays. The vulnerability is present in different forms in all versions, including `0.3.10`. For ints, the 2's complement representation is used. Because the array was declared very large, the bounds checking will pass Negative values will simply be represented as very large numbers. As of time of publication, a fixed version does not exist. There are three potential vulnerability classes: unpredictable behavior, accessing inaccessible elements and denial of service. Class 1: If it is possible to index an array with a negative integer without reverting, this is most likely not anticipated by the developer and such accesses can cause unpredictable behavior for the contract. Class 2: If a contract has an invariant in the form `assert index < x`, the developer will suppose that no elements on indexes `y | y >= x` are accessible. However, by using negative indexes, this can be bypassed. Class 3: If the index is dependent on the state of the contract, this poses a risk of denial of service. If the state of the contract can be manipulated in such way that the index will be forced to be negative, the array access can always revert (because most likely the array won't be declared extremely large). However, all these the scenarios are highly unlikely. Most likely behavior is a revert on the bounds check.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-24563. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-24563.md Affected: vyper < 0.4.0 Fixed in: 0.4.0, 0.4.0b1 Steps: 1. Search this machine and project for vyper (PyPI), vyperlang vyper: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Other
- https://github.com/vyperlang/vyper/blob/a1fd228cb9936c3e4bbca6f3ee3fb4426ef45490/vyper/codegen/core.py#L534-L541
- https://github.com/vyperlang/vyper/blob/c150fc49ee9375a930d177044559b83cb95f7963/vyper/semantics/types/subscriptable.py#L127-L137
- https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-150.yaml
- https://github.com/vyperlang/vyper
FAQ
Is CVE-2024-24563 being exploited?
There is no confirmed exploitation: CVE-2024-24563 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.24% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-24563?
Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2024-24563?
vyper < 0.4.0.
Is there a fix for CVE-2024-24563?
Yes. Fixed in 0.4.0, 0.4.0b1. Upgrade vyper to one of 0.4.0, 0.4.0b1 (or later in the same release line).
How do I check if I'm affected by CVE-2024-24563?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.