Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. vyper
  4. ›
  5. CVE-2024-24563

CVE-2024-24563: Vyper negative array index bounds checks

February 7, 2024 (updated November 22, 2024)

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. Typically, negative integers are filtered out at runtime by the bounds checker, but small enough (i.e. large in magnitude, ex. -2**255 + 5) quantities combined with large enough arrays (at least 2**255 in length) can pass the bounds checker, resulting in unexpected behavior.

A contract search was performed, and no production contracts were found to be impacted.

References

  • github.com/advisories/GHSA-52xq-j7v9-v4v2
  • github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-150.yaml
  • github.com/vyperlang/vyper
  • github.com/vyperlang/vyper/blob/a1fd228cb9936c3e4bbca6f3ee3fb4426ef45490/vyper/codegen/core.py
  • github.com/vyperlang/vyper/blob/c150fc49ee9375a930d177044559b83cb95f7963/vyper/semantics/types/subscriptable.py
  • github.com/vyperlang/vyper/security/advisories/GHSA-52xq-j7v9-v4v2
  • nvd.nist.gov/vuln/detail/CVE-2024-24563

Code Behaviors & Features

Detect and mitigate CVE-2024-24563 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.4.0

Fixed versions

  • 0.4.0

Solution

Upgrade to version 0.4.0 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-129: Improper Validation of Array Index

Source file

pypi/vyper/CVE-2024-24563.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:49 +0000.