---
id: "CVE-2026-114115"
kind: "vulnerability"
aliases: ["CVE-2026-114115"]
title: "Vyper: compiler miscompiles ternary over nested arrays, corrupting stored values"
severity: "medium"
cvss: 6.3
epss: 0.00221
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ethereum", "package", "smart-contracts", "vyper"]
not_affected_if: ["default-config"]
published_at: "2026-10-21T01:17:37+00:00"
first_seen_at: "2026-10-23T21:57:28+00:00"
updated_at: "2026-10-25T04:01:23+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114115", "first_seen_at": "2026-10-23T21:57:28+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-114115", "first_seen_at": "2026-10-24T13:15:54+00:00"}]
---

# Vyper: compiler miscompiles ternary over nested arrays, corrupting stored values

Vyper versions 0.3.8 through 0.5.0b1 compile a ternary expression that selects a nested array with narrower inner bounds using the wider type's memory layout. Contracts compiled this way can silently store corrupted values or revert.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the Vyper compiler version used to build contracts, for example with `vyper --version`, and see whether it falls in `0.3.8` through `0.5.0b1`.
- Search Vyper source for ternary (`if ... else`) expressions that select between nested array types of different inner lengths.

## Fix

- Upgrade the Vyper compiler to a release after `0.5.0b1`, then recompile and redeploy affected contracts.
- unknown: the sources do not name the first fixed version.

## Timeline

- 2026-10-23T21:57:28+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-114115
- 2026-10-24T13:15:54+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-114115

## From the sources

Vyper 0.3.8 through 0.5.0b1 contains a compiler miscompilation vulnerability in parse_IfExp that reads nested arrays with narrower inner bounds using the wider result type's memory layout. When a ternary selects the narrower array, inner arrays after the first are read at wrong offsets, causing contracts to silently store corrupted values or revert.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
