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 package | Versions | Reported by |
|---|---|---|
| vyperlang vyper | < 0.3.2, before 0.3.2 | CVE List, NVD |
| vyper (PyPI) | before 0.3.2, before 049dbdc647b2ce838fae7c188e6bb09cf16e470b | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 7.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N |
| GitHub | 7.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
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
| https://github.com/vyperlang/vyper/security/advisories/GHSA-4mrx-6fxm-8jpg | advisory, patch, third-party-advisory, web | |
| https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b | fix, patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-24788 | advisory | |
| https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-197.yaml | web | |
| https://github.com/vyperlang/vyper | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-24788 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4mrx-6fxm-8jpg changed 2024-11-19 | CC-BY-4.0 |
| NVD | CVE-2022-24788 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2022-197 changed 2023-11-08 | CC-BY-4.0 |