Read the docs
TI-2024-16184 Aliases CVE-2024-24563GHSA-52xq-j7v9-v4v2

Vyper array negative index vulnerability

Priority HIGH 76CWE-129Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-129 and the CVSS impact.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.01539 75th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed vyper (PyPI): 0.4.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
vyperlangvyperup to 0.3.10—No fix listedCNA
—vyper (PyPI)before 0.4.00.4.0Patch availableGHSA-52xq-j7v9-v4v2
  • vyper Vendorvyperlang Affected up to 0.3.10 Fixed in — No fix listed CNA
  • vyper (PyPI) Vendor— Affected before 0.4.0 Fixed in 0.4.0 Patch available GHSA-52xq-j7v9-v4v2

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:*up to 0.3.10Vulnerablevyperlang
  • cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:* Versions up to 0.3.10 Vulnerable ·vyperlang

Remediation

  • Fix · GHSA-52xq-j7v9-v4v2 vyper (PyPI) Fixed in 0.4.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-24563
  2. 2026-10-03 Alias added: GHSA-52xq-j7v9-v4v2

References

  • TI-2024-16182 Vyper bounds check on built-in `slice()` function can be overflowed CVSS 3.1CRITICAL 9.8
  • TI-2024-14992 concat built-in can corrupt memory in vyper CVSS 3.1CRITICAL 9.8
  • TI-2022-08657 Integer bounds error in Vyper CVSS 3.1CRITICAL 9.8
  • TI-2022-11796 Multiple evaluation of contract address in call in vyper CVSS 3.1HIGH 8.2
  • TI-2024-21531 vyper performs double eval of the argument of sqrt CVSS 3.1MEDIUM 5.3
  • TI-2024-21527 vyper performs incorrect topic logging in raw_log CVSS 3.1MEDIUM 5.3
See all 37 →

Sources