CVE-2022-24788
JSON

7.1high

Buffer overflow in Vyper

Severity
7.1high CVSS:3.1 by GitHub_M
Exploit likelihood
1.00% (higher than 62% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4mrx-6fxm-8jpgPYSEC-2022-197

Description

Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Versions of vyper prior to 0.3.2 suffer from a potential buffer overrun. Importing a function from a JSON interface which returns `bytes` generates bytecode which does not clamp bytes length, potentially resulting in a buffer overrun. Users are advised to upgrade. There are no known workarounds for this issue.

Affected

Product or packageVersionsReported by
vyperlang vyper< 0.3.2, before 0.3.2CVE List, NVD
vyper (PyPI)before 0.3.2, before 049dbdc647b2ce838fae7c188e6bb09cf16e470bGitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
GitHub7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

CWE-119CWE-120

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Versions of vyper prior to 0.3.2 suffer from a potential buffer overrun. Importing a function from a JSON interface which returns `bytes` generates bytecode which does not clamp bytes length, potentially resulting in a buffer overrun. Users are advised to upgrade. There are no known workarounds for this issue.

GitHub Advisory Database
Impact

Importing a function from a JSON interface which returns bytes generates bytecode which does not clamp bytes length, potentially resulting in a buffer overrun.

Patches

0.3.2 (as of https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b)

Workarounds

Use .vy interfaces.

NVD (es)

Vyper es un Lenguaje de Contratos Inteligentes pitónicos para la máquina virtual de Ethereum. Las versiones de vyper anteriores a 0.3.2, sufren un potencial desbordamiento del búfer. La importación de una función desde una interfaz JSON que devuelve "bytes" genera bytecode que no sujeta la longitud de los bytes, resultando potencialmente en un desbordamiento del búfer. Es recomendado a usuarios actualizar. No se presentan medidas de mitigación conocidas para este problema

References

Sources

SourceRecordLicence
CVE ListCVE-2022-24788 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-4mrx-6fxm-8jpg changed 2024-11-19CC-BY-4.0
NVDCVE-2022-24788 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2022-197 changed 2023-11-08CC-BY-4.0