VAITP Dataset

← Back to the dataset

CVE-2026-114114

UTF‑8 chars cause mis‑aligned offsets, letting attackers swap constants in Vyper bytecode.

  • CVSS 6.0
  • CWE-176
  • Input Validation and Sanitization
  • Remote

Vyper 0.1.0b1 before 0.1.0b12, 0.1.0b14, and 0.4.1 through 0.5.0b1 mix character-based line offsets with Python's UTF-8 byte col_offset values in vyper/ast/parse.py, so multi-byte characters shift the source slices used to reconstruct later numeric literals. An attacker contributing source with non-ASCII identifiers that NFKC-normalize to ASCII, or an invisible byte-order mark, can silently substitute addresses, integers or other constants in compiled code.

CVSS base score
6.0
Published
2026-10-21
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Algorithm
Code defect classification
Incorrect Algorithm
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
Vyper
Fixed by upgrading
Yes

Solution

Upgrade Vyper to 0.5.0b2 or later (the fix is included starting with 0.5.0b2).

Vulnerable code sample

import vyper
# VULNERABLE: Unicode identifier leads to wrong constant extraction
def compile_contract(src: str) -> bytes:
    # Directly compile the raw source; Vyper 0.1.0b1 mis‑calculates offsets for multi‑byte chars
    return vyper.compile_code(src, ['bytecode'])

Patched code sample

import vyper
import unicodedata
# FIX: Normalize source and strip BOM before compilation to avoid offset errors
def compile_contract(src: str) -> bytes:
    src = unicodedata.normalize('NFKC', src.lstrip('\ufeff'))
    return vyper.compile_code(src, ['bytecode'])

Cite this entry

@misc{vaitp:cve2026114114,
  title        = {{UTF‑8 chars cause mis‑aligned offsets, letting attackers swap constants in Vyper bytecode.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-114114},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-114114/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.