# CVE-2024-24559: Vyper SHA3 code generation bug

- Severity: Low 3.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2024-02-05T19:21:52.000Z
- Modified: 2026-09-10T03:50:09.814Z
- Also known as: GHSA-6845-xw22-ffxv, PYSEC-2024-147
- Weaknesses: CWE-327
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- vyperlang vyper: <= 0.3.10; 0.3.10; up to 0.3.10
- vyper (PyPI): before 0.4.0; before 0.4.0b1

## Every score

- GitHub_M: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/vyperlang/vyper/security/advisories/GHSA-6845-xw22-ffxv> (advisory, vendor-advisory, web)
- <https://github.com/vyperlang/vyper/blob/c150fc49ee9375a930d177044559b83cb95f7963/vyper/ir/compile_ir.py#L585-L586> (product, web)
- <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)

## Sources

- CVE List: [CVE-2024-24559](https://www.cve.org/CVERecord?id=CVE-2024-24559), CVE Terms of Use, modified 2024-08-26
- GitHub Advisory Database: [GHSA-6845-xw22-ffxv](https://github.com/advisories/GHSA-6845-xw22-ffxv), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-24559](https://nvd.nist.gov/vuln/detail/CVE-2024-24559), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-147](https://osv.dev/vulnerability/PYSEC-2024-147), CC-BY-4.0, modified 2024-11-21

---

Page: https://cve.day/CVE-2024-24559 · Whole record: https://cve.day/CVE-2024-24559.json · Rebuilt by cve.day 2026-11-25T22:58:36.566Z
