CVE-2023-31146: Vyper vulnerable to OOB DynArray access

vyper Updated 02 Oct 2025

Summary

12/05/2023
Yes i
High
7.5

CVE-2023-31146: Vyper vulnerable to OOB DynArray access when array is on both LHS and RHS of an assignment. Affects vyper versions < 0.3.8. Fixed in 0.3.8. 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 an open-source programming language that is designed for developing smart contracts on the Ethereum blockchain. It is primarily used for writing secure and efficient code for decentralized applications (dApps). Vyper provides a high-level syntax and enforces strict security measures to prevent common vulnerabilities in smart contracts.

Vulnerability Detail

The vulnerability in Vyper allows for out-of-bounds (OOB) dynamic array access when the array is on both the left-hand side (LHS) and right-hand side (RHS) of an assignment. This issue occurs during code generation, where the length word of a dynamic array is written before the data. As a result, it can lead to OOB array access, potentially causing data corruption or unexpected behavior. The vulnerability has a CVSS score of 7.5 (High).

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

0.3.8

This is the first release that contains the fix.

pip install --upgrade "vyper==0.3.8"

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

Workaround

There is no known workaround for this vulnerability. Users are advised to upgrade to the latest patched version of Vyper.

Conclusion

The vulnerability in Vyper allows for out-of-bounds dynamic array access, which can lead to data corruption or unexpected behavior in smart contracts. It is recommended to upgrade to the latest patched version of Vyper (0.3.8 or later) to mitigate this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for vyper →

Share this vulnerability

FAQ

Vyper is an open-source programming language for writing secure and efficient smart contracts on the Ethereum blockchain.

The vulnerability can lead to out-of-bounds array access, potentially causing data corruption or unexpected behavior in smart contracts written using Vyper.

To fix the vulnerability, you should upgrade to the latest patched version (0.3.8 or later) of the Vyper package.

There are no known workarounds for this vulnerability. Upgrading to the patched version 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

0.3.8

This is the first release that contains the fix.

pip install --upgrade "vyper==0.3.8"

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