Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify contract compiled with vulnerable Vyper optimizer
-
ExploitSend transaction hitting miscompiled ternary branch
-
ExecutionStorage records constant 1 instead of real value
-
ImpactFunds 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 |
| 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 |
| Exploit ScenarioDerived | A DeFi contract compiled with Vyper 0.3.8-0.5.0b1 under the default -O gas setting uses |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Related Vulnerabilities in Vyper Compiler Miscompilation and Parsing Bugs
View all 5Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. Rated critical severity (CVSS 9.8), this v
Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Rated critical severity (CVSS 9.8), this v
Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. Rated critical severity (CVSS 9.8), this v
Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Rated critical severity (CVSS 9.8), this v
Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). Rated critical severity (CVSS 9.1),
Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Rated critical severity (CVSS 9.1), this v
Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). Rated high severity (CVSS 8.1), this
Vyper is a Pythonic Smart Contract Language for the EVM. Rated high severity (CVSS 7.5), this vulnerability is remotely
Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Rated high severity (CVSS 7.5), this vulne
Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Rated high severity (CVSS 7.5), this vulne
Vyper is a pythonic smart contract language for the EVM. Rated high severity (CVSS 7.5), this vulnerability is remotely
Vyper is a Pythonic Smart Contract Language for the ethereum virtual machine. Rated high severity (CVSS 7.5), this vulne
EUVD-2026-106920
GHSA-xvvp-6q7c-mxwj
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB