Vyper: Return inside for loop more than 1 level deep
Affects vyperSource GCVE Database
CVSS 6.3 Medium : upgrade to 0.2.3 when convenient.
Data as of 6 Oct 2026, 16:48 UTC
- Patch
- Available – fixed in 0.2.3
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NWhat to do
Upgrade vyper to 0.2.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIvyper | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to Vyper version 0.2.3 or later, where this issue is fixed. Alternatively, avoid using return statements inside for loops nested more than one level deep in internal calls as a workaround.
Description
A vulnerability in Vyper versions from 0.1.0b10 up to but not including 0.2.3 causes a transaction revert when a return statement is used inside a for loop nested more than one level deep in internal calls. This results in an invalid jump destination and a stack underflow error. The impact is minor and mainly causes unnecessary transaction reverts, but under certain conditions, it could lead to a denial-of-service (DoS) on public contracts. The issue is fixed in Vyper 0.2.3.
References
- github.com/vyperlang/vyper/security/advisories/GHSA-vg88-3v92-rjx2 (opens in a new tab)
- github.com/vyperlang/vyper/pull/2110 (opens in a new tab)
- github.com/vyperlang/vyper/commit/a1d92e5eb968a34a23850359656aee23334adb90 (opens in a new tab)
- github.com/vyperlang/vyper (opens in a new tab)
- github.com/vyperlang/vyper/releases/tag/v0.2.3 (opens in a new tab)