Skip to main content

Vyper CVE-2026-114117

| EUVDEUVD-2026-106920 HIGH
Incorrect Calculation (CWE-682)
2026-10-21 VulnCheck GHSA-xvvp-6q7c-mxwj
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify contract compiled with vulnerable Vyper optimizer
  2. Exploit
    Send transaction hitting miscompiled ternary branch
  3. Execution
    Storage records constant 1 instead of real value
  4. Impact
    Funds mis-accounted or permanently locked

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Calculation correctness
Exploitation Conditions

Exploitation requires a contract compiled with Vyper 0.3.8 through 0.5.0b1 whose source contains the specific pattern (msg.value | K) or (len(msg.data) | K) - where K is a nonzero integer literal - used as a branch of a ternary expression, and compiled under -O gas (the default) or -O codesize. When present, the optimizer miscompiles that expression to the constant 1 with no warning or revert, corrupting storage writes, arithmetic, indexes, return values, or events. Limiting factors: the vulnerable code construct must already exist in the deployed contract (reflected as AT:P in the CVSS 4.0 vector); contracts not using this exact OR-in-ternary pattern, or compiled with other optimizer settings/fixed compiler versions, are unaffected. No authentication is required (PR:N) because any caller submitting a normal transaction triggers the already-miscompiled code path.

Impact

This is a compiler-correctness defect (CWE-682) in the Vyper optimizer, not a runtime memory-safety flaw, so its real-world risk is highly conditional. The supplied CVSS 4.0 vector (8.2) shows AV:N/PR:N/UI:N but critically carries AT:P (attack requirements present) and an integrity-only impact (VC:N/VI:H/VA:N) - meaning exploitation is reachable over the network by any unauthenticated caller ONLY if a deployed contract happens to contain the exact miscompiled code pattern. No EPSS score, no CISA KEV listing, and no public exploit were provided, which is consistent with a class of bug that is latent in already-deployed bytecode rather than actively weaponized across the internet. The 8.2 is driven by VI:H (silent incorrect values with no revert) applied to high-value financial contracts, but the AT:P requirement and the need for the specific (msg.value | K)/(len(msg.data) | K)-in-a-ternary pattern mean this is a targeted, contract-specific exposure rather than a broad spray-and-pray vulnerability. Note a data conflict: the input Tag 'Information Disclosure' contradicts the CVSS vector, which records VC:N (no confidentiality impact) - this is an integrity/miscompilation issue, not disclosure, and the tag should not be used to prioritize. Prioritize auditing and recompiling affected contracts, but do not treat this as an imminent mass-exploitation event absent EPSS/KEV signals.

Exploit ScenarioDerived

A DeFi contract compiled with Vyper 0.3.8-0.5.0b1 under the default -O gas setting uses (msg.value | K) inside a ternary branch to compute a deposit amount; the optimizer silently replaces that expression with the constant 1. An attacker (or ordinary user) sends a transaction whose deposit is recorded as 1 wei regardless of actual value sent, corrupting storage accounting so that funds become mis-credited or permanently locked. No public exploit was identified at time of analysis, and because the flaw carries AT:P the impact only occurs for contracts that actually contain the vulnerable pattern.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 21, 2026

Optimizer miscompilation in Vyper 0.3.8 through 0.5.0b1 can silently replace a ternary branch expression of the form (msg.value | K) or (len(msg.data) | K) with the constant 1 under default -O gas or -O codesize, corrupting contract logic and potentially locking funds. Only contracts containing that exact OR-in-ternary construct and compiled with an affected version are exposed; the flaw is a compiler-correctness issue rather than a runtime memory-safety bug. No public exploit code was identified at time of analysis, and risk is highly conditional on deployed bytecode containing the miscompiled pattern.

RemediationAI

No exact patched compiler version is identified in the provided data; consult the GitHub security advisory GHSA-6j9c-gvcw-74fj and the VulnCheck advisory for the fixed release before compiling contracts that use the affected construct. Contracts already deployed with affected Vyper versions cannot be patched on-chain and must be redeployed after correcting the source or compiler version. As a source-level workaround, rewrite ternary branches that use (msg.value | K) or (len(msg.data) | K) with a nonzero integer literal so the OR expression is not evaluated directly in that branch, and verify the resulting bytecode and behavior. Compiling with an optimizer mode outside -O gas and -O codesize, such as -O none, may avoid the miscompilation as a temporary workaround, but this increases bytecode size and gas costs and should be validated against the advisory. For contracts that record deposits, pause deposit functions and plan migration of funds before redeploying.

Affected VersionsENISA

vyper 0.3.8 ≤0.5.0b1

Affected Packages

euvd vyper no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Vyper is a Python-like smart contract language that compiles to EVM bytecode. The issue is CWE-682 (Incorrect Calculation): the optimizer incorrectly folds a bitwise OR expression involving msg.value or len(msg.data) and a nonzero integer literal when that expression appears as a ternary branch under -O gas (the default) or -O codesize, producing the constant 1 instead of the intended value. The CPE cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:*:*:* reflects the compiler as the affected component. Because the miscompiled value can flow into storage writes, arithmetic, indexes, return values, or events without warning or revert, affected contracts may record deposits incorrectly and lock funds. Exploitation requires the vulnerable source construct to already exist in a deployed contract and the contract to have been compiled with an affected Vyper version and optimizer setting; contracts without this exact pattern or compiled with other settings are unaffected.

Know when Vyper gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

AV:N and PR:N because any unauthenticated caller triggers it via a transaction, but AC:H reflects the required pre-existing vulnerable code pattern; impact is integrity-only (silent wrong values), so C:N/A:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Vyper 0.3.8 through 0.5.0b1 contains an optimizer miscompilation in which (msg.value | K) or (len(msg.data) | K), where K is any nonzero integer literal, is compiled to the constant 1 when used as a ternary expression branch under -O gas (the default) or -O codesize. Affected contracts use the wrong value in storage writes, arithmetic, indexes, return values, or events without warning or revert, which can record deposits incorrectly and lock funds.

Technical POC Analysis

CWE-682 (Incorrect Calculation): a compiler optimizer miscompilation, not a runtime memory-safety bug.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Vyper compiler versions 0.3.8 through 0.5.0b1 can silently miscompile a specific ternary construct involving msg.value or len(msg.data), replacing a branch with the constant 1 and corrupting on-chain contract logic compiled with default optimization settings. Any team with production smart contracts built from these compiler versions and containing that exact pattern faces potential irreversible fund locking and logic corruption, making this a financial-integrity exposure rather than an infrastructure one. Leadership should care because the defect is invisible in source review, persists in already-deployed bytecode, and remediation requires recompilation and possible contract migration.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: rewrite the OR-in-ternary construct as an explicit conditional in source and recompile with an unaffected Vyper version; verify semantics by diffing bytecode produced at -O gas, -O codesize, and -O none; block deployments and upgrades from affected compiler versions in CI; apply pause, guardian, or timelock controls to funds-bearing contracts; and monitor deployed contracts for anomalous constant-value behavior pending migration.

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
Medium
major EVM smart-contract compiler, popular in DeFi but niche overall
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

More in Vyper

View all
CVE-2024-24563 CRITICAL POC
9.8 Feb 07

Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. Rated critical severity (CVSS 9.8), this v

CVE-2024-24561 CRITICAL POC
9.8 Feb 01

Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Rated critical severity (CVSS 9.8), this v

CVE-2024-22419 CRITICAL POC
9.8 Jan 18

Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. Rated critical severity (CVSS 9.8), this v

CVE-2022-24845 CRITICAL POC
9.8 Apr 13

Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Rated critical severity (CVSS 9.8), this v

CVE-2023-39363 CRITICAL POC
9.1 Aug 07

Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). Rated critical severity (CVSS 9.1),

CVE-2023-31146 CRITICAL POC
9.1 May 11

Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Rated critical severity (CVSS 9.1), this v

CVE-2023-42443 HIGH POC
8.1 Sep 18

Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). Rated high severity (CVSS 8.1), this

CVE-2023-42460 HIGH POC
7.5 Sep 27

Vyper is a Pythonic Smart Contract Language for the EVM. Rated high severity (CVSS 7.5), this vulnerability is remotely

CVE-2023-32059 HIGH POC
7.5 May 11

Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Rated high severity (CVSS 7.5), this vulne

CVE-2023-32058 HIGH POC
7.5 May 11

Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Rated high severity (CVSS 7.5), this vulne

CVE-2023-30837 HIGH POC
7.5 May 08

Vyper is a pythonic smart contract language for the EVM. Rated high severity (CVSS 7.5), this vulnerability is remotely

CVE-2023-30629 HIGH POC
7.5 Apr 24

Vyper is a Pythonic Smart Contract Language for the ethereum virtual machine. Rated high severity (CVSS 7.5), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy