Skip to main content
VulnerabilityPublished

Vyper: Return inside for loop more than 1 level deep

Affects vyperSource GCVE Database

0

CVSS 6.3 Medium : upgrade to 0.2.3 when convenient.

Data as of 6 Oct 2026, 16:48 UTC

CVSS 4.0 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

What to do

Upgrade vyper to 0.2.3.

Affected software

ProductAffectedFixed in
PyPIvyperAffected
  • >=0.1.0b10 <0.2.3
Fixed in
  • 0.2.3

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

Community reviews

Loading reviews…