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

CVE-2024-32646: vyper performs double eval of the slice start/length args in certain cases

April 25, 2024 (updated January 21, 2025)

Using the slice builtin can result in a double eval vulnerability when the buffer argument is either msg.data, self.code or <address>.code and either the start or length arguments have side-effects.

A contract search was performed and no vulnerable contracts were found in production. Having side-effects in the start and length patterns is also an unusual pattern which is not that likely to show up in user code. It is also much harder (but not impossible!) to trigger the bug since 0.3.4 since the unique symbol fence was introduced (https://github.com/vyperlang/vyper/pull/2914).

References

  • github.com/advisories/GHSA-r56x-j438-vw5m
  • github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-207.yaml
  • github.com/vyperlang/vyper
  • github.com/vyperlang/vyper/pull/2914
  • github.com/vyperlang/vyper/security/advisories/GHSA-r56x-j438-vw5m
  • nvd.nist.gov/vuln/detail/CVE-2024-32646

Code Behaviors & Features

Detect and mitigate CVE-2024-32646 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 5.3 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation

Source file

pypi/vyper/CVE-2024-32646.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:00 +0000.