{"id":"CVE-2024-24559","published":"2024-02-05T21:04:42Z","modified":"2024-08-26T18:13:59Z","title":"Vyper SHA3 code generation bug","vendor":"vyperlang","product":"vyper","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00358,"percentile":0.21908,"provenance":"source"},"cwes":[{"id":"CWE-327","name":"Use of a Broken or Risky Cryptographic Algorithm"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-6845-xw22-ffxv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vyperlang/vyper/blob/c150fc49ee9375a930d177044559b83cb95f7963/vyper/ir/compile_ir.py#L585-L586","tags":["x_refsource_MISC"]}],"priority":{"score":7.0,"factors":[{"name":"EPSS percentile","points":4.38},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"vyperlang","affectedVersions":[{"vendor":"vyperlang","product":"vyper","versions":["<= 0.3.10"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-02-06T17:47:59.401665Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vyper","vulnerableRanges":["<0.4.0","<0.4.0b1"],"patched":["0.4.0","0.4.0b1"],"from":["GHSA-6845-xw22-ffxv","PYSEC-2024-147"],"provenance":"source"}],"summary":{"text":"The Vyper smart contract language's compiler has a stack management error when generating the intermediate representation (IR) for sha3_64, which is used for mapping lookups, where the height variable is miscalculated. An attacker would need to hand-write IR that is fed to the compiler, since regular Vyper code cannot trigger the flaw, and no flow caching the key was found, so the issue is not expected to be reachable during normal compilation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:19Z"},"euvd":{"id":"EUVD-2024-0174","exploited":false,"provenance":"source"}}