wireshark-mcp CVE-2026-43901
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker crafts malicious pcap with HTTP object
-
DeliveryAttacker delivers pcap to target system or monitoring segment
-
ExploitAI model processes pcap via wireshark-mcp MCP client
-
InstallPrompt injection in pcap metadata manipulates model decision
-
C2Model calls wireshark_export_objects with dest_dir=/home/user/.ssh/
-
ExecuteMCP server accepts path (WIRESHARK_MCP_ALLOWED_DIRS=None) and creates directory
-
Impacttshark extracts HTTP object and writes to arbitrary filesystem path
-
Step 8Attacker gains SSH access or cron execution capability
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the following specific conditions: (1) wireshark-mcp version 1.1.5 or earlier must be running; (2) the WIRESHARK_MCP_ALLOWED_DIRS environment variable must NOT be set (this is the default configuration); (3) an AI model or system calling the MCP server must process an attacker-controlled or attacker-influenced pcap file; (4) the pcap must contain an HTTP object with a crafted filename or metadata (e.g., Content-Disposition header); (5) the attacker must successfully use prompt injection or model manipulation to cause the MCP client to invoke wireshark_export_objects (or another affected file-write operation) with an attacker-controlled dest_dir parameter pointing to a sensitive location (e.g., /home/user/.ssh/, /etc/cron.d/); (6) the directory path specified must be writable by the wireshark-mcp process (typically true for user home directories and cron.d in many configurations). Exploitation is BLOCKED if WIRESHARK_MCP_ALLOWED_DIRS is explicitly set to a safe directory, as the existing validation code enforces the sandbox when the variable is configured. No special tshark configuration, non-default pcap format, or privilege escalation is required; the vulnerability exists in unmodified default installations. |
| Impact | CVSS 6.8 (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N) indicates network-accessible, high-complexity, unauthenticated attack requiring user interaction (AI model decision) with high confidentiality and integrity impact but no availability impact. The AC:H and UI:R factors suggest the attack requires manipulation of an AI model's decision-making via prompt injection and likely specific pcap crafting, explaining why CVSS is moderate rather than critical despite arbitrary file write severity. However, real-world risk is elevated because: (1) proof of concept is confirmed and reproducible on current versions (wireshark-mcp 1.1.5, tshark 4.6.4); (2) exploitation does not require code changes-the vulnerability is latent in default configurations; (3) the attack targets high-value endpoints (/home/user/.ssh/, /etc/cron.d/, web roots); (4) the MCP protocol is designed for AI integration, and prompt injection via pcap content is plausible when AI models parse network traffic; (5) no vendor patch exists, leaving all users of version 1.1.5 and earlier exposed. The missing patch combined with confirmed POC and straightforward exploitation path (pcap → prompt injection → file write) elevates this beyond a theoretical CVSS calculation. The limiting factor is that the attacker must first influence what pcap file the AI model analyzes and successfully manipulate its reasoning-both achievable but not trivial in all deployment contexts. Organizations using wireshark-mcp without WIRESHARK_MCP_ALLOWED_DIRS set face immediate risk; those with the environment variable configured are protected by the existing (but optional) sandbox. |
| Exploit ScenarioDerived | An attacker crafts a pcap file containing an HTTP response with a malicious Content-Disposition header (e.g., filename=authorized_keys) and embedded SSH public key as the object body. The attacker sends this pcap to a target organization or embeds it in a monitored network segment. An AI assistant or analyst using wireshark-mcp processes the pcap file and, via prompt injection in the pcap's metadata or payload, is manipulated into calling wireshark_export_objects with dest_dir=/home/user/.ssh/. Because WIRESHARK_MCP_ALLOWED_DIRS is not set (default), the MCP server accepts the path, tshark extracts the HTTP object, and the attacker's public key is written to the user's SSH authorized_keys file, granting unauthenticated SSH access. The same attack can target /etc/cron.d/, web application directories, or other writable sensitive paths. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Arbitrary file write in wireshark-mcp up to version 1.1.5 allows remote attackers to write files to any filesystem location via prompt injection in pcap payloads that trigger the wireshark_export_objects MCP tool. The vulnerability exploits missing mandatory path restrictions when the WIRESHARK_MCP_ALLOWED_DIRS environment variable is not configured (default state). An attacker can craft a malicious pcap with embedded HTTP objects bearing filenames like authorized_keys, manipulate an AI model using the MCP server into calling export_objects with dest_dir=/home/user/.ssh/, and achieve SSH access, cron hijacking, or web shell placement. Publicly available proof of concept confirms exploitation against version 1.1.5 with tshark 4.6.4; no vendor-released patch exists at time of analysis.
RemediationAI
No vendor-released patch is available at time of analysis. Users must immediately set the WIRESHARK_MCP_ALLOWED_DIRS environment variable to a restricted, non-sensitive directory before starting the wireshark-mcp server; for example, export WIRESHARK_MCP_ALLOWED_DIRS=/tmp/wireshark_mcp_safe. This activates the existing but optional sandbox and restricts all file-write operations to the designated path, preventing writes to /home/user/.ssh/, /etc/cron.d/, or other sensitive locations. Additional compensating controls include running wireshark-mcp in a containerized environment (e.g., Docker) with read-only root filesystem and minimal host mounts, restricting the MCP server's process privileges via AppArmor or SELinux to deny file write access outside permitted directories, and isolating the MCP server on a network segment with strict egress filtering to prevent automated recon or lateral movement if compromise occurs. Users should monitor the GitHub advisory (https://github.com/bx33661/Wireshark-MCP/security/advisories/GHSA-3r68-x3xc-rxpg) for patch availability. Until patched, do not deploy wireshark-mcp in trusted environments without WIRESHARK_MCP_ALLOWED_DIRS set; using it with default settings allows remote arbitrary file write.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
wireshark-mcp is a Python MCP (Model Context Protocol) server that wraps tshark (Wireshark's command-line packet analyzer) for use by AI models. The vulnerability resides in src/wireshark_mcp/tshark/client.py (lines 521-543 and 685-839), where file-write operations (_validate_output_path, wireshark_export_objects, merge_pcap_files, editcap_trim, editcap_split, editcap_time_shift, editcap_deduplicate, text2pcap_import) lack mandatory path sandboxing. The _allowed_dirs attribute defaults to None and is only activated when the WIRESHARK_MCP_ALLOWED_DIRS environment variable is explicitly set. When unset, os.makedirs(dest_dir, exist_ok=True) and tshark's --export-objects flag accept arbitrary attacker-controlled paths. The root cause (CWE-22: Improper Limitation of a Pathname to a Restricted Directory; CWE-73: External Control of File Name or Path) stems from optional rather than mandatory validation-the sandbox exists in code but is disabled by default. The attack surface includes prompt injection via malicious pcap payloads that manipulate AI models into calling these tools with crafted parameters.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Primary rating from Vendor (https://github.com/bx33661/Wireshark-MCP) · only source for this CVE.
CVSS VectorVendor: https://github.com/bx33661/Wireshark-MCP
DescriptionCVE.org
Description
Impact
wireshark-mcp exposes a wireshark_export_objects MCP tool that accepts an attacker-controlled dest_dir parameter and passes it to tshark's --export-objects flag with no mandatory path restriction.
The path sandbox (_allowed_dirs) is None by default and only activates when the environment variable WIRESHARK_MCP_ALLOWED_DIRS is explicitly set. In a default installation, any directory on the filesystem can be used as the export destination.
Affected code (src/wireshark_mcp/tshark/client.py:531-543):
output_validation = self._validate_output_path(dest_dir)
# _validate_output_path only enforces the sandbox when _allowed_dirs is set.
# Default: _allowed_dirs = None → no restriction.
os.makedirs(dest_dir, exist_ok=True)
# creates arbitrary directories
cmd = [..., "--export-objects", f"{protocol},{dest_dir}"]
Attack Scenario
An attacker embeds a crafted HTTP response in a pcap file (e.g. Content-Disposition: filename=authorized_keys). Via prompt injection in the pcap payload, an AI model using this MCP server is manipulated into calling wireshark_export_objects with:
dest_dir=/home/user/.ssh/
tshark then extracts and writes the HTTP object to that path, granting the attacker SSH access.
The same technique can target:
/etc/cron.d/- Writable web roots
- Other sensitive filesystem locations
Additional Affected Operations
The same missing sandbox affects:
merge_pcap_fileseditcap_trimeditcap_spliteditcap_time_shifteditcap_deduplicatetext2pcap_import
Proof of Concept
Confirmed on wireshark-mcp v1.1.5 with tshark 4.6.4.
A crafted pcap’s HTTP object was successfully written to an arbitrary filesystem path when:
_allowed_dirs = None
---
Patches
Not yet patched.
A fix should make the path sandbox mandatory for all file-write operations rather than optional:
# Reject all write operations when no sandbox is configured
if not self._allowed_dirs:
return json.dumps({
"success": False,
"error": {
"type": "SecurityError",
"message": "Set WIRESHARK_MCP_ALLOWED_DIRS before using file-write operations"
}
})
---
Workarounds
Set WIRESHARK_MCP_ALLOWED_DIRS to a restricted safe directory before starting the server:
export WIRESHARK_MCP_ALLOWED_DIRS=/tmp/wireshark_mcp_safe
This activates the existing sandbox and blocks writes outside the allowed path.
---
Resources
- Vulnerable code:
src/wireshark_mcp/tshark/client.pylines 521-543src/wireshark_mcp/tshark/client.pylines 685-839- CWE-22: Improper Limitation of a Pathname to a Restricted Directory
- CWE-73: External Control of File Name or Path
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Affected Products (CPE)CVE.org
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
GHSA-3r68-x3xc-rxpg
NVD
CVE.org
EPSS
Exploit-DB