☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 9.8 🐛 CWE-119
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-24561

CVE-2024-24561 Out-of-Bounds Access in Vyper
📅 PUBLISHED: 2024-02-01 16:37 UTC 🔄 UPDATED: 2026-10-08 19:49 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.90%
👁️
0.90% probability
22.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-24561 is a critical integer overflow vulnerability in the Vyper smart contract language (versions 0.3.10 and earlier). The flaw exists in the bounds checking logic for slice operations when non-literal arguments are used for start or length. An attacker can exploit this to cause an integer overflow, bypassing the intended bounds check and enabling out-of-bounds (OOB) access to storage, memory, or calldata. This can lead to arbitrary data manipulation, contract state corruption, and potential total compromise of the smart contract. The CVSS score is 9.8 (Critical), and no official patch has been released at the time of analysis.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Vyper is a Python-based smart contract language for the Ethereum Virtual Machine (EVM). It is distributed via PyPI (vyper package) and GitHub. The vulnerability affects all versions up to and including 0.3.10. Since Vyper is used to compile smart contracts, any contract compiled with a vulnerable version is at risk. Developers must immediately upgrade to a patched version (once available) or apply manual mitigations. The supply chain risk is high because the vulnerability is in the compiler itself, affecting all downstream contracts.

CVSS Breakdown & Threat Level

  • CVSS Score: 9.8 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High
  • Integrity Impact: High
  • Availability Impact: High

The vulnerability is trivially exploitable by any attacker who can interact with a vulnerable smart contract. No authentication or user interaction is required. Successful exploitation leads to complete compromise of the contract's data and logic.

Deep Dive & Mechanics

The vulnerability resides in the Vyper compiler's handling of slice operations on arrays (e.g., arr[start:start+length]). When start or length are non-literal (i.e., variables or expressions), the compiler performs a bounds check: start + length <= len(arr). However, if start + length overflows (e.g., start = 2^256 - 1 and length = 1), the sum wraps around to a small value, bypassing the check. This allows an attacker to specify a slice that extends beyond the array bounds, enabling OOB read/write.

The root cause is the use of unchecked arithmetic in the bounds check. The EVM's native arithmetic is modulo 2^256, so overflow is silent. The Vyper compiler did not use safe math (e.g., checked_add) for this specific check.

Attack Scenario:

  1. Deploy a contract with a vulnerable slice operation.
  2. Call a function that uses a non-literal start or length parameter.
  3. Provide values that cause start + length to overflow (e.g., start = 2^256 - 10, length = 20).
  4. The bounds check passes (since 2^256 - 10 + 20 wraps to 10), but the actual slice accesses memory/storage beyond the array.
  5. The attacker can read or write arbitrary storage slots, memory, or calldata.

Vulnerable vs. Patched Code

Vulnerable Code (Vyper 0.3.10):

@external
def vulnerable_slice(arr: uint256[10], start: uint256, length: uint256) -> uint256[10]:
    # Bounds check: start + length <= 10
    assert start + length <= 10, "out of bounds"
    # Slice operation (simplified)
    return arr[start:start+length]

Patched Code (Hypothetical):

@external
def patched_slice(arr: uint256[10], start: uint256, length: uint256) -> uint256[10]:
    # Safe bounds check using checked arithmetic
    assert start <= 10, "start out of bounds"
    assert length <= 10 - start, "length out of bounds"
    # Slice operation
    return arr[start:start+length]

The patched version checks start and length separately, ensuring no overflow can occur. Alternatively, the compiler could use checked_add from Vyper's built-in safe math.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Vyper compiler 0.3.10 or earlier
  • Ethereum development environment (e.g., Hardhat, Brownie)
  • A vulnerable smart contract

Exploit Contract (Vyper):

# Exploit contract
@external
def exploit(target: address):
    # Call vulnerable function with overflow values
    # start = 2^256 - 10, length = 20
    # This passes the bounds check but reads OOB
    result: uint256[10] = target.vulnerable_slice([0,0,0,0,0,0,0,0,0,0], 2**256 - 10, 20)
    # result now contains data from arbitrary storage

Exploit Steps:

  1. Deploy the vulnerable contract.
  2. Deploy the exploit contract.
  3. Call exploit() with the target address.
  4. The slice operation will read OOB data, potentially leaking sensitive information or overwriting critical storage.

Expected Outcome: The attacker gains unauthorized read/write access to the contract's storage, memory, or calldata.

Blue Team (Detection & Defense)

Detection:

  • Monitor for transactions with unusually large start or length parameters in slice operations.
  • Use static analysis tools to detect unsafe arithmetic in Vyper contracts.
  • Deploy runtime monitoring that checks for OOB access patterns.

Defense:

  • Immediately upgrade to a patched version of Vyper (once available).
  • Apply manual safe math checks in all slice operations.
  • Use Vyper's built-in checked_add and checked_sub functions.
  • Limit the use of non-literal slice parameters in external functions.

Indicators of Compromise (IOCs)

  • Transaction Patterns: Transactions with start or length values near 2^256 - 1 in slice operations.
  • Storage Corruption: Unexpected changes to storage slots that should be immutable.
  • Memory Leaks: Contracts returning data that should not be accessible (e.g., private variables).
  • Compiler Version: Contracts compiled with Vyper <= 0.3.10.

Detection Engineering

YARA Rule

rule CVE_2024_24561_Vyper_Slice_Overflow {
    meta:
        description = "Detects Vyper bytecode with vulnerable slice bounds check"
        author = "Valters IT"
        date = "2024-01-01"
        cve = "CVE-2024-24561"
    strings:
        $opcode1 = { 60 0A }  // PUSH1 10 (array length)
        $opcode2 = { 01 }     // ADD (start + length)
        $opcode3 = { 10 }     // LT (comparison)
        $opcode4 = { 15 }     // ISZERO (assert)
    condition:
        all of them
}

Sigma Rule

title: CVE-2024-24561 Vyper Slice Overflow Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects transactions exploiting Vyper slice integer overflow
author: Valters IT
date: 2024-01-01
logsource:
    category: ethereum
    product: blockchain
detection:
    selection:
        - "function": "vulnerable_slice"
        - "params.start": "> 2^255"
        - "params.length": "> 2^255"
    condition: selection
falsepositives:
    - Legitimate use of large arrays (unlikely)
level: critical

Suricata Rule

alert ip any any -> any any (
    msg:"CVE-2024-24561 Vyper Slice Overflow Exploit";
    content:"|60 0A 01 10 15|";
    sid:1000001;
    rev:1;
    reference:cve,2024-24561;
    classtype:attempted-admin;
)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Vyper Compiler: Once a patched version is released (e.g., 0.3.11 or later), upgrade immediately.
  2. Manual Code Fix: For existing contracts, replace unsafe slice bounds checks with safe arithmetic:
    assert start <= len(arr)
    assert length <= len(arr) - start
    
  3. Use Safe Math: Leverage Vyper's built-in checked_add and checked_sub for all arithmetic in bounds checks.

Long-Term Measures:

  • Implement static analysis in CI/CD pipelines to detect unsafe arithmetic.
  • Conduct regular security audits of smart contracts.
  • Monitor for new Vyper releases and apply patches promptly.

Workarounds:

  • Avoid using non-literal arguments for start and length in slice operations.
  • Restrict external functions that accept slice parameters to trusted callers only.

Valters IT
DevSecOps & Cyber Threat Intelligence

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-24561/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.