vyperlang/vyper · Security
Buffer Overflow in vyper
- GHSA ID
- GHSA-4mrx-6fxm-8jpg
- CVE ID
- CVE-2022-24788
- Severity
- high
- Published
- Updated
- CVSS
- 7.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
- CVSS v3
- 7.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
- CVSS v4
- 7.1 · 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
Description
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.
CWEs
- CWE-119 · Improper Restriction of Operations within the Bounds of a Memory Buffer
- CWE-120 · Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
References
- https://github.com/vyperlang/vyper/security/advisories/GHSA-4mrx-6fxm-8jpg ↗
- https://nvd.nist.gov/vuln/detail/CVE-2022-24788 ↗
- https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b ↗
- https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-197.yaml ↗
- https://github.com/advisories/GHSA-4mrx-6fxm-8jpg ↗