Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-61301 — High Vulnerability (7.5) - CAPEv2 reporting/mongodb.py and reporting/jsondump.py allow denial-of-analysis when deeply nested or oversized behavior documents trigger orjson serialization errors or MongoDB BSON size/nesting limits, causing truncated or missing analysis reports. | Kitploit
Tools/GitHubGitHub/egkritsis/cve-2025-61301
Dynamic Analysis (Sandboxing)Vulnerability AnalysisExploitationMalware AnalysisPenetration Testing
GitHubegkritsis/cve-2025-61301

CVE-2025-61301

High Vulnerability (7.5) - CAPEv2 reporting/mongodb.py and reporting/jsondump.py allow denial-of-analysis when deeply nested or oversized behavior documents trigger orjson serialization errors or MongoDB BSON size/nesting limits, causing truncated or missing analysis reports.

View Repository
28 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-61301 - CAPEv2: Denial-Of-Analysis via Recursive Process Forking

Description

A High-Severity Denial-of-analysis vulnerability affects reporting/mongodb.py and reporting/jsondump.py in CAPEv2 (commit 52e4b43, on 2025-05-17) allows attackers who can submit samples to cause incomplete or missing behavioral analysis reports by generating deeply nested or oversized behavior data that trigger MongoDB BSON limits or orjson recursion errors when the sample executes in the sandbox.


CVSS Score

CVSS v3.1: 7.5 (High)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H


Authors / Researchers

  • Evgenios Gkritsis - Department of Informatics, Athens University of Economics and Business, Greece
  • Constantinos Patsakis - Department of Informatics, University of Piraeus, Greece
  • George Stergiopoulos - Department of Informatics, Athens University of Economics and Business, Greece

Details

The root cause of this vulnerability lies in CAPEv2’s handling of large, deeply nested behavior reports generated during dynamic malware analysis.

  • MongoDB BSON Document Size Limit:
    CAPEv2 uses MongoDB to store analysis reports, which have a 16 MB BSON document size limit [1].
    When reports exceed this size, often due to extensive process trees, API calls, or recursive data, the database rejects the insert, causing report generation to fail.

  • MongoDB Nesting Depth Limit:
    MongoDB also enforces a maximum nesting depth of 100 levels per BSON document.
    Recursive malware behaviors can easily exceed this, leading to insert failures even when the document size is under 16 MB.

  • Python JSON Serialization Limits:
    CAPEv2 relies on Python’s orjson library to serialize results into JSON.
    Deeply nested or recursive structures cause the serializer to hit Python’s recursion limits, leading to serialization failures and aborted report generation [2].

  • Pruning and Error Handling:
    CAPEv2 attempts to mitigate these issues by pruning large portions of the report progressively (removing child nodes or entire process subtrees).
    However, this is insufficient when behavior complexity surpasses pruning thresholds, resulting in repeated failures to save the report.


Manifestation in Practice

  • Analysis jobs with long timeouts and complex payloads produce large reports that trigger these limits.
  • The system logs MongoDB OperationFailure Code 15 errors and “Recursion limit reached” errors during JSON serialization.
  • Final reports often show no behavioral data or indicate failed reporting, making it appear as if the malware was benign or inactive.

Impact

This is a denial-of-analysis vulnerability in CAPEv2 that can cause the dynamic analysis engine to fail to capture or report behavioral activity. Exploitation allows adversaries to bypass behavioral detection and produce incomplete or missing analysis reports.

Key impacts

  • Detection Evasion: Malicious behavior may not be recorded or reported, causing malware to appear clean or benign in analysis results.
  • False Confidence: CAPEv2 can complete analyses with no visible errors while behavior logging has partially or fully failed, giving analysts a misleading sense of security.
  • Reusable Evasion Technique: The technique can be embedded into loaders, droppers, or staged payloads, making it reusable across campaigns.
  • Ease of Exploitation: The technique is straightforward to reproduce and does not require deep technical expertise, increasing its appeal for mass distribution or red-team tooling.

Downstream consequences

In pipelines that depend on CAPEv2 for triage or threat intelligence enrichment, this flaw can lead to:

  • Missed IOCs
  • Misclassification of advanced threats
  • Incomplete forensic timelines

Affected Products

CAPEv2 — repository: https://github.com/kevoreilly/CAPEv2

Relevant commit / build information

  • Commit Hash: 52e4b43a2cb508d3483819042cf8e4d8348f3a05
  • Commit Date: Tue, June 17, 2025 — 16:09:50 (UTC+1)
  • Author: Kevin O'Reilly ([email protected])
  • Branch: master
  • Relevant PR / Merge: PR #2624 — enzok/updates-01

Evidence Table

The following table presents evidence from multiple analysis tasks, showing how increasing complexity and duration lead to MongoDB and serialization failures, resulting in incomplete or missing behavior reports.

Table 1: CAPEv2 analysis results showing correlation between task complexity, report size, and failure conditions.

Proof Of Concept (PoC)

Summary

Spawns 5,000 processes and performs multi‑round XOR decryption at runtime to emulate realistic evasion. For custom builds (different recursion rounds, key lengths, or process volumes), contact the authors for a custom version.

Run the demo:

root@kitploit:~
poc\vathos_demo.exe <IP> <PORT>

Make sure a listener is running on the specified IP/PORT (e.g., nc, ncat, Metasploit, or any C2 listener) to observe connection attempts. In a properly functioning sandbox the connection attempt would be visible; under the denial-of-analysis conditions described, the connection may not appear in CAPEv2 reports.

Suggested CAPEv2 configurations for testing

  • Timeout range: 180+ seconds

Options to vary:

  • With / without full-proc-memory-dumps
  • With / without import-reconstruction-proc-dumps
  • store_compressed = yes and store_compressed = no

Ensure MongoDB and orjson are using their default limits for these tests.

Expected results

As process-tree depth and complexity increase, reporting failures may occur such as:

  • MongoDB Code 15 (BSON document size exceeded)
  • BSON nesting limit exceeded
  • Python / orjson recursion limit reached

CAPEv2 may:

  • Fail to generate full reports
  • Omit behavioral data
  • Display unresponsive behavior in the web interface
  • Fail to detect the malicious activity

Figure 1 - Backend logs shows JSON dump warnings, orjson/serialization errors and MongoDB OperationFailure entries Figure 1 - Backend logs

Figure 2 - Dashboard: failed_analysis Figure 2 - analysis job status

Figure 3 - Behavioral tab: "Sorry! No behavior." Figure 3 - behavioral page is empty despite execution


References

  1. “MongoDB Limits and Thresholds - Database Manual - MongoDB Docs.” https://www.mongodb.com/docs/manual/reference/limits/
  2. orjson — Fast, correct Python JSON library. https://github.com/ijl/orjson
  3. https://www.cve.org/CVERecord?id=CVE-2025-61301
Download Tool
Timeout (sec)Custom SettingsDuration (sec)Logged ProcessesBSON Logs (Files / Size)Report.json Size (KB)Errors / WarningsBehavior Status
60enforce-timeout4132425 / 126 KB613–Behavior OK
60–2523839 / 200 KB923–Behavior OK
60full-proc-memory-dumps, import-reconstruction-proc-dumps, enforce-timeout, syscall2304243 / 230 KB1054–Behavior OK
100full-proc-memory-dumps, import-reconstruction-proc-dumps, enforce-timeout, syscall3306162 / 318 KB1482–Behavior OK
100–2778182 / 493 KB2032–Behavior OK
120full-proc-memory-dumps, import-reconstruction-proc-dumps, enforce-timeout, syscall3407273 / 383 KB1793–Behavior OK
120––8889 / 475 KB2228–Behavior OK
180full-proc-memory-dumps, import-reconstruction-proc-dumps, enforce-timeout, syscall4149091 / 492 KB2356MongoDB Code 15No behavior
180–3238889 / 475 KB2228–Behavior OK
200–413119120 / 645 KB3174MongoDB Code 15No behavior
200full-proc-memory-dumps, import-reconstruction-proc-dumps, enforce-timeout––144 / 726 KB–Recursion limit reached, MongoDB Code 15Failed reporting
300–513146147 / 779 KB3676MongoDB Code 15No behavior
300full-proc-memory-dumps, import-reconstruction-proc-dumps, enforce-timeout, syscall––167 / 892 KB–Recursion limit reached, MongoDB Code 15Failed reporting