CVE-2024-24559
MEDIUM 5.3CVSS 3.1Vyper sha3 codegen bug
Vyper is a Pythonic Smart Contract Language for the EVM. There is an error in the stack management when compiling the IR for sha3_64. Concretely, the height variable is miscalculated. The vulnerability can't be triggered without writing the IR by hand (that is, it cannot be triggered from regular vyper code). sha3_64 is used for retrieval in mappings. No flow that would cache the key was found so the issue shouldn't be possible to trigger when compiling the compiler-generated IR. This issue isn't triggered during normal compilation of vyper code so the impact is low. At the time of publication there is no patch available.
- Published
- 5 Feb 2024
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-327
- Also known as
- GHSA-6845-xw22-ffxvPYSEC-2024-147
- Sources
- NVDJSONOSV GHSA-6845-xw22-ffxvJSONOSV PYSEC-2024-147JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vyperlang | vypercpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:* |
<= 0.3.10 | |
| OSV | PyPI | vyper | < 0.4.0 | 0.4.0 |
| OSV | PyPI | vyper | < 0.4.0b1 | 0.4.0b1 |
References
- https://github.com/vyperlang/vyper/blob/c150fc49ee9375a930d177044559b83cb95f7963/vyper/ir/compile_ir.py#L585-L586 · Product, WEB
- https://github.com/vyperlang/vyper/security/advisories/GHSA-6845-xw22-ffxv · Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2024-24559 · ADVISORY
- https://github.com/vyperlang/vyper/pull/4063 · WEB
- https://github.com/vyperlang/vyper/commit/d9f9fdadd81a148cbc68f02dbbbcdc0c92fad652 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-147.yaml · WEB
- https://github.com/vyperlang/vyper · PACKAGE
History
- 25 Nov 2026 20:54 UTC · NVD: first stored (published 5 Feb 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 5 Feb 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 5 Feb 2024)