CVE-2023-32058: Vyper - Overflow Vulnerability

vyper Updated 02 Oct 2025

Summary

11/05/2023
Yes i
High
7.5

CVE-2023-32058: Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Affects vyper across 2 version ranges.

< 0.3.8 < 3de1415ee77a9244eb04bdb695e249d3ec9ed868

Fixed in 3de1415ee77a9244eb04bdb695e249d3ec9ed868. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Vyper is a Pythonic smart contract language designed for the Ethereum virtual machine. It provides a more secure and user-friendly alternative to Solidity. Vyper allows developers to write smart contracts with reduced attack surface and improved readability. However, prior to version 0.3.8, Vyper is vulnerable to an overflow issue in loop variables. This vulnerability occurs when assigning the iterator of a loop to a variable, potentially leading to a type overflow. The issue is specific to loops of the form 'for i in range(a, a + N)'. The Vyper compiler fails to detect this overflow, resulting in a potential security risk.

Vulnerability Detail

The vulnerability in Vyper arises from the absence of an overflow check for loop variables. When assigning the iterator of a loop to a variable in loops of the form 'for i in range(a, a + N)', it is possible to overflow the type of the variable. This overflow can lead to unexpected behavior and potential security vulnerabilities. It is important to note that this issue does not occur in loops of the form 'for i in range(start, stop)' or 'for i in range(stop)', as the Vyper compiler can raise a TypeMismatch error in those cases. The vulnerability has been addressed in version 0.3.8 of Vyper.

How To Fix

Latest published version: 0.4.3 as of 22 Oct 2026

pip install --upgrade "vyper==0.4.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3de1415ee77a9244eb04bdb695e249d3ec9ed868

This is the first release that contains the fix.

pip install --upgrade "vyper==3de1415ee77a9244eb04bdb695e249d3ec9ed868"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended solution is to update to Vyper version 0.3.8 or later.

Conclusion

The vulnerability in Vyper, prior to version 0.3.8, allows for potential type overflow in loop variables. This can lead to unexpected behavior and potential security risks in smart contracts. To mitigate this vulnerability, it is crucial to update to Vyper version 0.3.8 or later. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for vyper →

Share this vulnerability

FAQ

Vyper is a Pythonic smart contract language for the Ethereum virtual machine. It aims to provide a more secure and user-friendly alternative to Solidity.

The vulnerability allows for potential type overflow in loop variables, which can lead to unexpected behavior and potential security risks in smart contracts written using Vyper.

To fix this vulnerability, update your Vyper version to 0.3.8 or later.

No, only versions prior to 0.3.8 are affected by this vulnerability.

There is no specific workaround mentioned for this vulnerability. Updating to Vyper version 0.3.8 or later is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for vyper.

How To Fix

Latest published version: 0.4.3 as of 22 Oct 2026

pip install --upgrade "vyper==0.4.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3de1415ee77a9244eb04bdb695e249d3ec9ed868

This is the first release that contains the fix.

pip install --upgrade "vyper==3de1415ee77a9244eb04bdb695e249d3ec9ed868"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback