CVE-2025-27104
CVE-2025-27104 is a high-severity vulnerability in Vyperlang Vyper with a CVSS 3.x base score of 7.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-662.
Key facts
- Severity: High (CVSS 3.x base score 7.5)
- CVSS v4: 2.3
- EPSS exploit prediction: 0% (33rd percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2025-4282
- Weakness: CWE-662
- Affected product: Vyperlang Vyper
- Published:
- Last modified:
Description
vyper is a Pythonic Smart Contract Language for the EVM. Multiple evaluation of a single expression is possible in the iterator target of a for loop. While the iterator expression cannot produce multiple writes, it can consume side effects produced in the loop body (e.g. read a storage variable updated in the loop body) and thus lead to unexpected program behavior. Specifically, reads in iterators which contain an ifexp (e.g. `for s: uint256 in ([read(), read()] if True else [])`) may interleave reads with writes in the loop body. Vyper for loops allow two kinds of iterator targets, namely the `range()` builtin and an iterable type, like SArray and DArray. During codegen, iterable lists are required to not produce any side-effects (in the following code, `range_scope` forces `iter_list` to be parsed in a constant context, which is checked against `is_constant`). However, this does not prevent the iterator from consuming side effects provided by the body of the loop. For SArrays on the other hand, `iter_list` is instantiated in the body of a `repeat` ir, so it can be evaluated several times. This issue is being addressed and is expected to be available in version 0.4.1. Users are advised to upgrade as soon as the patched release is available. There are no known workarounds for this vulnerability.
Frequently asked questions
- What is CVE-2025-27104?
- vyper is a Pythonic Smart Contract Language for the EVM. Multiple evaluation of a single expression is possible in the iterator target of a for loop. While the iterator expression cannot produce multiple writes, it can consume side effects produced in the loop body (e.g. read a storage variable updated in the loop body) and thus lead to unexpected program behavior. Specifically, reads in iterators which contain an ifexp (e.g. `for s: uint256 in ([read(), read()] if True else [])`) may interleave reads with writes in the loop body. Vyper for loops allow two kinds of iterator targets, namely the `range()` builtin and an iterable type, like SArray and DArray. During codegen, iterable lists are required to not produce any side-effects (in the following code, `range_scope` forces `iter_list` to be parsed in a constant context, which is checked against `is_constant`). However, this does not prevent the iterator from consuming side effects provided by the body of the loop. For SArrays on the other hand, `iter_list` is instantiated in the body of a `repeat` ir, so it can be evaluated several times. This issue is being addressed and is expected to be available in version 0.4.1. Users are advised to upgrade as soon as the patched release is available. There are no known workarounds for this vulnerability.
- How severe is CVE-2025-27104?
- CVE-2025-27104 has a CVSS 3.x base score of 7.5, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is none, integrity none, and availability high.
- Is CVE-2025-27104 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (33rd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2025-27104?
- CVE-2025-27104 affects Vyperlang Vyper. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2025-27104?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- Does CVE-2025-27104 have an EU (EUVD) identifier?
- Yes. CVE-2025-27104 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-4282.
- When was CVE-2025-27104 published?
- CVE-2025-27104 was published on 2025-02-21 and last updated on 2026-06-17.
References
- https://github.com/vyperlang/vyper/pull/4488
- https://github.com/vyperlang/vyper/security/advisories/GHSA-h33q-mhmp-8p67
Affected products (1)
- cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:python:*:*
More vulnerabilities in Vyperlang Vyper
- CVE-2024-24563 — Critical (CVSS 9.8): Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. Arrays can be keyed by a signed integer,…
- CVE-2024-24561 — Critical (CVSS 9.8): Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In versions 0.3.10 and earlier, the…
- CVE-2025-27105 — Critical (CVSS 9.1): vyper is a Pythonic Smart Contract Language for the EVM. Vyper handles AugAssign statements by first caching the target…
- CVE-2022-24845 — High (CVSS 8.8): Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In affected versions, the return of…
- CVE-2022-29255 — High (CVSS 8.2): Vyper is a Pythonic Smart Contract Language for the ethereum virtual machine. In versions prior to 0.3.4 when a calling…
- CVE-2023-42443 — High (CVSS 8.1): Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). In version 0.3.9 and prior, under…
All CVEs affecting Vyperlang Vyper →
Other CWE-662 vulnerabilities
- CVE-2018-15555 — Critical (CVSS 9.8): On Telus Actiontec WEB6000Q v1.1.02.22 devices, an attacker can login with root level access with the user "root" and…
- CVE-2024-32644 — Critical (CVSS 9.1): Evmos is a scalable, high-throughput Proof-of-Stake EVM blockchain that is fully compatible and interoperable with…
- CVE-2026-53277 — High (CVSS 8.8): In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: Take the SRCU lock for page table…
- CVE-2022-23005 — High (CVSS 8.7): Western Digital has identified a weakness in the UFS standard that could result in a security vulnerability. This…
- CVE-2016-8368 — High (CVSS 8.6): An issue was discovered in Mitsubishi Electric Automation MELSEC-Q series Ethernet interface modules QJ71E71-100, all…
- CVE-2022-1931 — High (CVSS 8.1): Incorrect Synchronization in GitHub repository polonel/trudesk prior to 1.2.3.