{"id":"CVE-2024-24559","summary":"Vyper SHA3 code generation bug","details":"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.","aliases":["GHSA-6845-xw22-ffxv","PYSEC-2024-147"],"modified":"2026-04-09T09:59:57.104926Z","published":"2024-02-05T21:04:42.056Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-327"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/24xxx/CVE-2024-24559.json"},"references":[{"type":"WEB","url":"https://github.com/vyperlang/vyper/blob/c150fc49ee9375a930d177044559b83cb95f7963/vyper/ir/compile_ir.py#L585-L586"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/24xxx/CVE-2024-24559.json"},{"type":"ADVISORY","url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-6845-xw22-ffxv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24559"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/vyperlang/vyper","events":[{"introduced":"0"},{"last_affected":"9136169468f317a53b4e7448389aa315f90b95ba"}],"database_specific":{"versions":[{"introduced":"0"},{"last_affected":"0.3.10"}]}}],"versions":["0.2.1","pre-release","v0.0.4","v0.1.0-beta.1","v0.1.0-beta.10","v0.1.0-beta.11","v0.1.0-beta.12","v0.1.0-beta.13","v0.1.0-beta.14","v0.1.0-beta.15","v0.1.0-beta.16","v0.1.0-beta.17","v0.1.0-beta.2","v0.1.0-beta.3","v0.1.0-beta.5","v0.1.0-beta.6","v0.1.0-beta.7","v0.1.0-beta.8","v0.1.0-beta.9","v0.2.0","v0.2.1","v0.2.10","v0.2.11","v0.2.12","v0.2.13","v0.2.14","v0.2.15","v0.2.16","v0.2.2","v0.2.3","v0.2.4","v0.2.5","v0.2.6","v0.2.7","v0.2.8","v0.2.9","v0.3.0","v0.3.1","v0.3.10","v0.3.10rc1","v0.3.10rc2","v0.3.10rc3","v0.3.10rc4","v0.3.10rc5","v0.3.2","v0.3.3","v0.3.4","v0.3.5","v0.3.6","v0.3.7","v0.3.8","v0.3.9"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-24559.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"}]}