Security Resilience

CVE-2025-27104

Vyperlang Vyper ≤ 0.4.1

Public PoC
Published
21 February 2025
Modified
28 March 2025
Patch / advisory
CVSS Score v4 2.3
Click a component to see what it means
Raw vectorCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0045 40th percentile
Risk Priority 27 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2025-27104 is a low-severity Improper Synchronization (CWE-662) vulnerability in Vyperlang Vyper. Its CVSS base score is 2.3 (Low).

Operationally, ranked at the 40th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SC-39 (Process Isolation) and SC-4 (Information in Shared System Resources) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2025-27104 is a vulnerability in vyper, a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). It enables multiple evaluations of a single expression in the iterator target of a for loop, allowing the iterator to consume side effects produced in the loop body, such as reading a storage variable updated during iteration. This can lead to unexpected program behavior, particularly with iterators containing if expressions (e.g., `for s: uint256 in ([read(), read()] if True else [])`) or SArrays, where the iterator list is instantiated in a `repeat` IR and re-evaluated multiple times. Vyper's codegen enforces constant context for iterable lists like range() but fails to prevent side-effect consumption from the loop body.

Remote attackers require no privileges (PR:N) and can exploit the vulnerability over the network (AV:N) by interacting with deployed smart contracts compiled using affected vyper versions that contain vulnerable for loops. Triggering such loops causes interleaved reads and writes, potentially resulting in incorrect contract execution or state manipulation. The CVSS v3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) highlights high availability impact due to disrupted program flow, with associated CWEs including CWE-662 (Component with Excessive Influence).

The vyper security advisory (GHSA-h33q-mhmp-8p67) and pull request #4488 state that the issue is addressed in version 0.4.1. Users are advised to upgrade to the patched release as soon as available, with no known workarounds.

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

CVEs Like This One

CVE-2024-32481Same product: Vyperlang Vyper
CVE-2024-24564Same product: Vyperlang Vyper
CVE-2023-32059Same product: Vyperlang Vyper
CVE-2024-32649Same product: Vyperlang Vyper
CVE-2024-24560Same product: Vyperlang Vyper
CVE-2025-21607Same product: Vyperlang Vyper
CVE-2024-32646Same product: Vyperlang Vyper
CVE-2023-32675Same product: Vyperlang Vyper
CVE-2023-30629Same product: Vyperlang Vyper
CVE-2024-24563Same product: Vyperlang Vyper

Affected Assets

vyperlang
vyper
≤ 0.4.1

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Process isolation reduces the attack surface and blast radius of synchronization failures but does not itself implement the required synchronization.

SC-4 directly requires preventing unintended information transfer through shared resources, which is achieved only by proper synchronization primitives for exclusive access.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing can detect synchronization flaws but does not itself implement the required controls.

prevents

Secure coding standards explicitly mandate proper use of locks, semaphores, and atomic operations to eliminate race conditions.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-662, a class-level weakness, and none of its children carries one either.

References