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

CVE-2025-47774

CVE-2025-47774 Security Advisory in Vyper
📅 PUBLISHED: 2025-05-15 17:38 UTC 🔄 UPDATED: 2026-09-23 20:37 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.46%
👁️
0.46% probability
11.5× 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
2.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-47774 is a vulnerability in the Vyper programming language, a Pythonic language for the Ethereum Virtual Machine (EVM). The flaw resides in the slice() built-in function, which can elide side effects when the output length is 0 and the source bytestring is a built-in like msg.data or <address>.code. This occurs because the check that length >= 1 is skipped for these source locations. The result is that a 0-length bytestring constructed with slice() can be passed to make_byte_array_copier, which elides evaluation of its source argument when the max length is 0. The impact is that side effects in the start argument may be elided when the length argument is 0, e.g., slice(msg.data, self.do_side_effect(), 0). The fix in pull request 4645 disallows any invocation of slice() with length 0, including for the ad hoc locations discussed in this advisory. The fix is expected to be part of version 0.4.2.

⚡ 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 language for EVM smart contracts. This vulnerability affects the Vyper compiler itself, which is a critical component in the Ethereum development supply chain. If exploited, it could lead to unexpected behavior in smart contracts compiled with vulnerable versions, potentially causing financial loss or logic errors. The package is distributed via PyPI and GitHub, and developers should ensure they are using a patched version (0.4.2 or later) to avoid supply chain risks.

CVSS Breakdown & Threat Level

The CVSS score is 0.0, indicating that no official CVSS vector has been assigned. However, based on the vulnerability description, the following breakdown is estimated:

  • Attack Vector (AV): Network (AV:N) - The vulnerability can be triggered by deploying a malicious smart contract.
  • Attack Complexity (AC): Low (AC:L) - The attack requires crafting a specific slice() call.
  • Privileges Required (PR): None (PR:N) - No special privileges are needed to deploy a contract.
  • User Interaction (UI): None (UI:N) - No user interaction is required.
  • Scope (S): Unchanged (S:U) - The vulnerability affects the contract's execution.
  • Confidentiality (C): None (C:N) - No data confidentiality impact.
  • Integrity (I): Low (I:L) - Side effects can be elided, potentially altering contract state.
  • Availability (A): Low (A:L) - The vulnerability could cause unexpected behavior.

Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Threat Level: Medium. The vulnerability allows side-effect elision, which could be exploited to bypass security checks or manipulate contract logic.

Deep Dive & Mechanics

The vulnerability is in the Vyper compiler's handling of the slice() built-in function. In Vyper, slice() is used to extract a substring from a bytestring. The function takes three arguments: the source bytestring, the start index, and the length. When the length is 0, the compiler should still evaluate the start index to ensure side effects are executed. However, for built-in source locations like msg.data or <address>.code, the compiler skips the check that length >= 1. This allows a 0-length slice to be passed to make_byte_array_copier, which elides evaluation of the source argument when the max length is 0.

Root Cause: The compiler's optimization logic incorrectly assumes that a 0-length slice does not need to evaluate the start argument, leading to side-effect elision.

Impact: An attacker can craft a smart contract that uses slice() with a length of 0 and a start argument that has side effects (e.g., a function call that modifies state). The side effects will be silently ignored, potentially allowing the attacker to bypass security checks or manipulate contract state.

Vulnerable vs. Patched Code

Vulnerable Code (Vyper <= 0.4.2rc1):

# In the compiler, the slice() function for built-in sources skips the length check
# This allows slice(msg.data, self.do_side_effect(), 0) to elide the side effect

Patched Code (Vyper >= 0.4.2):

# The fix in PR 4645 disallows any invocation of slice() with length 0
# This ensures that side effects in the start argument are always evaluated

Exploitation & Lab Setup

Red Team

Exploitation Scenario: An attacker deploys a smart contract that uses slice() with a length of 0 and a start argument that has side effects. The side effects are elided, allowing the attacker to bypass security checks.

Lab Setup:

  1. Install a vulnerable version of Vyper (e.g., 0.4.2rc1).
  2. Create a smart contract with the following code:
    @external
    def exploit() -> bool:
        # This call should trigger a side effect, but it will be elided
        slice(msg.data, self.do_side_effect(), 0)
        return True
    
    @internal
    def do_side_effect() -> uint256:
        # Modify some state variable
        self.some_state = 1
        return 0
    
  3. Compile and deploy the contract on a test Ethereum network.
  4. Call the exploit() function and observe that self.some_state remains unchanged, indicating the side effect was elided.

Blue Team

Detection: Monitor for smart contracts that use slice() with a length of 0. This can be done by analyzing the bytecode or source code of deployed contracts.

Mitigation: Update to Vyper version 0.4.2 or later, which disallows slice() with length 0.

Indicators of Compromise (IOCs)

  • Smart Contract Bytecode: Contracts that contain slice() calls with a length of 0.
  • Source Code Patterns: Use of slice() with a length of 0 and a start argument that has side effects.
  • Transaction Patterns: Transactions that call functions using slice() with a length of 0.

Detection Engineering

YARA Rule

rule CVE_2025_47774_Vyper_Slice_Zero_Length {
    meta:
        description = "Detects Vyper smart contracts using slice() with length 0"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2025-47774"
    strings:
        $slice_zero = /slice\s*\([^,]+,\s*[^,]+,\s*0\s*\)/
    condition:
        $slice_zero
}

Sigma Rule

title: CVE-2025-47774 - Vyper slice() Zero Length Side Effect Elision
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects Vyper smart contracts using slice() with length 0
author: Valters IT
date: 2025-04-10
logsource:
    category: smart_contract
    product: vyper
detection:
    selection:
        source_code|contains: "slice("
        source_code|contains: ", 0)"
    condition: selection
falsepositives:
    - None expected
level: high

Suricata Rule

alert tcp any any -> any any (msg:"CVE-2025-47774 - Vyper slice() Zero Length Side Effect Elision"; content:"slice("; content:", 0)"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update Vyper to version 0.4.2 or later as soon as it is released.
  2. Review all smart contracts compiled with vulnerable versions for use of slice() with length 0.
  3. If such usage is found, redeploy the contracts with a patched compiler.

Long-Term Mitigation:

  • Implement static analysis tools to detect dangerous slice() usage.
  • Educate developers about the risks of side-effect elision in smart contracts.

Workarounds:

  • Avoid using slice() with a length of 0 in Vyper smart contracts.
  • Use alternative methods to achieve the desired functionality without relying on slice() with zero length.

Valters IT
DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-47774/ · 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.