Optimizer miscompilation of msg.value | K in Vyper ternary branches
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
Vyper versions 0.3.8 through 0.5.0b1 contain an optimizer miscompilation (CWE-682) that compiles (msg.value | K) or (len(msg.data) | K), where K is any nonzero integer literal, to the constant 1 when used as a ternary expression branch under -O gas or -O codesize. Affected contracts use the wrong value without warning or revert, which can record deposits incorrectly and lock funds.
Written with Claude Haiku 5.5 from the sources below · 2026-11-03
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
The sources list no fixed version for vyper.
Written with Claude Haiku 5.5 from the sources below · 2026-11-03
Vendor assessments
Timeline
- 2026-10-21 Threatist record created from CVE-2026-114117
- 2026-10-21 CISA SSVC decision points changed
- 2026-10-21 Priority changed: MEDIUM → HIGH
- 2026-11-03 Affected versions changed · Red Hat
- 2026-11-03 CVSS score added · Red Hat
References
More vyperlang vulnerabilities
- TI-2024-16182 Vyper bounds check on built-in `slice()` function can be overflowed CVSS 3.1CRITICAL 9.8
- TI-2024-14992 concat built-in can corrupt memory in vyper CVSS 3.1CRITICAL 9.8
- TI-2024-16184 Vyper array negative index vulnerability CVSS 3.1CRITICAL 9.8
- TI-2022-08657 Integer bounds error in Vyper CVSS 3.1CRITICAL 9.8
- TI-2022-11796 Multiple evaluation of contract address in call in vyper CVSS 3.1HIGH 8.2
- TI-2024-21531 vyper performs double eval of the argument of sqrt CVSS 3.1MEDIUM 5.3
Sources
- CVE-2026-114117 · CVE Program
- CVE-2026-114117 · NVD
- FIRST EPSS
- CVE-2026-114117 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences