☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-61301

CVE-2025-61301 Denial of Service in Capev2
📅 PUBLISHED: 2025-10-20 00:00 UTC 🔄 UPDATED: 2026-10-02 19:31 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.36%
👁️
0.36% probability
8.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
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
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-61301 is a denial-of-analysis vulnerability in CAPEv2, an open-source malware analysis sandbox. The flaw resides in the reporting modules reporting/mongodb.py and reporting/jsondump.py. An attacker who can submit a malicious sample to the sandbox can craft deeply nested or oversized behavioral data. When the sample executes, this data triggers MongoDB BSON document size limits (16 MB) or orjson recursion errors, causing the reporting pipeline to fail. This results in incomplete or missing behavioral analysis reports, effectively blinding the security operations team to the sample's true actions.

The vulnerability has a CVSS score of 0.0 (placeholder) but is assessed as a medium-severity denial-of-service (DoS) against the analysis pipeline. No public exploit code or proof-of-concept is available, and no official patch has been released. The attack requires authenticated access to submit samples, limiting the attack surface to internal users or compromised API keys.

⚡ 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

CAPEv2 is a Python-based project that relies on the PyPI packages orjson and pymongo. The vulnerability is not in these dependencies themselves but in how CAPEv2 uses them without input validation or size limits. The orjson library is known to raise RecursionError on deeply nested JSON structures, and MongoDB enforces a 16 MB BSON document limit. The CAPEv2 code does not catch these exceptions or truncate the data before submission.

CVSS Breakdown & Threat Level

Metric Value
Attack Vector (AV) Network (N)
Attack Complexity (AC) Low (L)
Privileges Required (PR) Low (L) – requires sample submission access
User Interaction (UI) None (N)
Scope (S) Unchanged (U)
Confidentiality (C) None (N)
Integrity (I) None (N)
Availability (A) Low (L) – only analysis reports are affected
Base Score 4.3 (Medium)

Threat Level: Medium. The vulnerability does not allow code execution or data exfiltration, but it degrades the core function of the sandbox—producing behavioral reports. In a SOC environment, this could delay incident response or allow malicious samples to evade detection.

Deep Dive & Mechanics

CAPEv2 uses two reporting backends:

  • MongoDB (reporting/mongodb.py): Stores analysis results as BSON documents. MongoDB enforces a 16 MB document size limit. If the behavioral data (e.g., API call logs, file operations) exceeds this limit, the insert operation fails silently or raises an exception.
  • JSON Dump (reporting/jsondump.py): Serializes analysis results to JSON using orjson. Deeply nested data (e.g., recursive directory listings, deeply nested API call arguments) can cause orjson to hit Python's recursion limit (default 1000), raising a RecursionError.

The attacker crafts a sample that, when executed in the sandbox, generates an excessive amount of behavioral data. For example:

  • A script that recursively enumerates directories or creates deeply nested registry keys.
  • A binary that performs millions of API calls in a tight loop.
  • A sample that generates a very long string or deeply nested JSON structure in its arguments.

When the sandbox agent collects this data and passes it to the reporting module, the module fails to handle the oversized input. The result is a partial or empty report, and the analysis is marked as failed or incomplete.

Vulnerable vs. Patched Code

Vulnerable Code (commit 52e4b43):

In reporting/mongodb.py:

def save_report(report):
    # No size check or exception handling
    collection.insert_one(report)

In reporting/jsondump.py:

def save_report(report):
    with open(output_path, 'w') as f:
        f.write(orjson.dumps(report).decode())

Patched Code (hypothetical):

# reporting/mongodb.py
def save_report(report):
    try:
        # Truncate or split oversized reports
        if len(bson.BSON.encode(report)) > 16 * 1024 * 1024:
            report = truncate_report(report)
        collection.insert_one(report)
    except Exception as e:
        log.error(f"Failed to save report: {e}")
        save_fallback(report)

# reporting/jsondump.py
def save_report(report):
    try:
        with open(output_path, 'w') as f:
            f.write(orjson.dumps(report, option=orjson.OPT_APPEND_NEWLINE).decode())
    except RecursionError:
        log.warning("Recursion limit hit, saving truncated report")
        save_truncated_report(report)

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Access to a CAPEv2 instance with sample submission enabled.
  • Ability to upload a PE file, script, or other executable.

Exploit Steps:

  1. Create a Python script that generates deeply nested data:
    import os
    import json
    
    def create_nested_structure(depth=1000):
        if depth == 0:
            return "leaf"
        return {"nested": create_nested_structure(depth - 1)}
    
    # Write to a file that will be executed in the sandbox
    with open("payload.py", "w") as f:
        f.write("import json\n")
        f.write("data = " + json.dumps(create_nested_structure(1500)) + "\n")
        f.write("print(json.dumps(data))\n")
    
  2. Compile or package the script as a PE file (e.g., using PyInstaller).
  3. Submit the sample to CAPEv2.
  4. Wait for analysis to complete. The report will be empty or show an error.

Alternative Payload (MongoDB BSON limit):

  • Create a binary that writes a 20 MB file to disk or performs 1,000,000 API calls.

Blue Team

Detection:

  • Monitor CAPEv2 logs for errors like BSON document too large or RecursionError.
  • Set up alerts for analysis tasks that complete with zero or minimal behavioral data.
  • Use the Sigma rule below to detect submission patterns.

Mitigation:

  • Implement input validation and size limits in the reporting modules.
  • Use a queue or streaming approach to handle large reports.
  • Apply rate limiting on sample submissions.

Indicators of Compromise (IOCs)

  • Log Entries:
    • pymongo.errors.DocumentTooLarge: BSON document too large
    • RecursionError: maximum recursion depth exceeded
    • orjson.JSONEncodeError: RecursionError
  • File Artifacts:
    • Empty or truncated JSON report files in the CAPEv2 output directory.
    • Error logs containing the above messages.
  • Network:
    • No specific network IOCs; the attack is local to the sandbox.

Detection Engineering

YARA Rule

rule CVE_2025_61301_CAPEv2_Denial_of_Analysis {
    meta:
        description = "Detects CAPEv2 log entries indicating denial-of-analysis via oversized BSON or recursion errors"
        author = "Valters IT"
        date = "2025-05-20"
        reference = "CVE-2025-61301"
        severity = "medium"
    strings:
        $bson_error = "BSON document too large" nocase
        $recursion_error = "RecursionError" nocase
        $orjson_error = "orjson.JSONEncodeError" nocase
    condition:
        any of them
}

Sigma Rule

title: CAPEv2 Denial-of-Analysis via Oversized Data
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects CAPEv2 log entries indicating failure due to oversized BSON or recursion errors
author: Valters IT
date: 2025-05-20
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-61301
logsource:
    product: capev2
    service: reporting
detection:
    selection:
        - "BSON document too large"
        - "RecursionError"
        - "orjson.JSONEncodeError"
    condition: selection
falsepositives:
    - Legitimate large samples (rare)
level: medium

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-61301 CAPEv2 Denial-of-Analysis Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/submit"; http_uri; pcre:"/(?i)(bson|recursion|oversized)/"; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Patch the code: Add exception handling and size limits in reporting/mongodb.py and reporting/jsondump.py.
  2. Restrict sample submission: Limit who can submit samples. Use API keys with least privilege.
  3. Monitor logs: Set up alerts for the error messages listed in IOCs.

Long-term Fixes:

  • Implement a streaming or chunked reporting mechanism to handle large data.
  • Add a configuration option to cap the maximum report size.
  • Use a message queue (e.g., RabbitMQ) to decouple analysis from reporting.

Workarounds:

  • Disable the MongoDB or JSON dump reporting backend if not needed.
  • Use a different serialization library that handles recursion gracefully.

Valters IT
DevSecOps & Cyber Threat Intelligence

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