CVE-2024-24559 json
Vyper SHA3 code generation bug
published 2024-02-05 2 y ago modified 2026-09-10 1 mo ago also GHSA-6845-xw22-ffxv , PYSEC-2024-147 , EUVD-2024-0174
- cvss
- 3.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 17%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi vyper 0.4.0, 0.4.0b1
- github.com/vyperlang/vyper@d9f9fda commit
- github.com/vyperlang/vyper#4063 pull request
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.26% chance of exploitation in the next 30 days, higher than 17% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | vyper | <0.4.0 <0.4.0b1 |
0.4.0 0.4.0b1 |
Affected products
- vyperlang vyper
Classification
- Weakness
-
- CWE-327 Use of a Broken or Risky Cryptographic Algorithm
References
-
github.com
/vyperlang/vyper/pull/4063
web
-
github.com
/vyperlang/vyper/commit/d9f9fdadd81a148cbc68f02dbbbcdc0c92fad652
web
-
github.com
/vyperlang/vyper/security/advisories/GHSA-6845-xw22-ffxv
web, vendor-advisory, advisory
-
github.com
/vyperlang/vyper/blob/c150fc49ee9375a930d177044559b83cb95f7963/vyper/ir/compile_ir.py#L585-L586
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2024-24559
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2024-147.yaml
web
-
github.com
/vyperlang/vyper
package
Sources
- CVE List CVE-2024-24559
- GitHub Advisory GHSA-6845-xw22-ffxv
- NVD CVE-2024-24559
- OSV PYSEC-2024-147
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.