Always-Incorrect Control Flow Implementation Affecting vyper package, versions [0.1.0b10,0.2.3)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-VYPER-21693750
  • published24 Oct 2026
  • disclosed6 Oct 2026
  • creditUnknown

Introduced: 6 Oct 2026

New CVE NOT AVAILABLE CWE-670  (opens in a new tab)

How to fix?

Upgrade vyper to version 0.2.3 or higher.

Overview

vyper is a Pythonic Smart Contract Language for the EVM.

Affected versions of this package are vulnerable to Always-Incorrect Control Flow Implementation in make_return_stmt in vyper/codegen/return_.py when a return statement is executed inside a for loop, the loop's values are not popped from the stack before the function returns. This leaves the EVM stack in a corrupted state, causing incorrect behavior or a crash in contracts that use return inside a loop body.

Note: This is only exploitable in contracts that use return statements inside for loops, particularly in combination with nested calls.

CVSS Base Scores

version 4.0
version 3.1