Summary
Description
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
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
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}"]
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2026-43901 has a CVSS score of 6.8 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. No fixed version is listed yet, so configuration controls and monitoring matter more in the interim.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
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"
}
})
Frequently Asked Questions
- What is CVE-2026-43901? CVE-2026-43901 is a medium-severity path traversal vulnerability in wireshark-mcp (pip), affecting versions <= 1.1.5. No fixed version is listed yet. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2026-43901? CVE-2026-43901 has a CVSS score of 6.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of wireshark-mcp are affected by CVE-2026-43901? wireshark-mcp (pip) versions <= 1.1.5 is affected.
- Is there a fix for CVE-2026-43901? No fixed version is listed for CVE-2026-43901 yet. Monitor the advisory for updates and apply mitigations in the interim.
- Is CVE-2026-43901 exploitable, and should I be worried? Whether CVE-2026-43901 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-43901 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-43901? No fixed version is listed yet. In the interim: Resolve the canonical path after applying any user-supplied input, and verify it remains within the intended directory before accessing it.