CVE-2024-24563:
Vyper negative array index bounds checks
9.8
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
2/7/2024
Updated
11/22/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
vyper | pip | < 0.4.0 | 0.4.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key points:
- Typechecker weakness: The validate_index_type function in subscriptable.py validates against IntegerT.any() instead of requiring unsigned integers, allowing signed indexes.
- Runtime validation flaw: The bounds checking logic in core.py uses unsigned comparisons that interpret negative values as large positive numbers, enabling bypass when arrays are declared with lengths >= 2^255. The combination of these two flaws allows negative array indexing in specific scenarios. Both functions are directly referenced in vulnerability details and PoC code, with clear technical explanations in the provided code comments and advisory descriptions.