CVE-2026-43901 — wireshark-mcp
MEDIUMCVE-2026-43901 is a medium-severity (CVSS 6.8) Path Traversal vulnerability in wireshark-mcp. No vendor fix is recorded yet; mitigation options are listed below.
Wireshark MCP: Arbitrary file write via export_objects when WIRESHARK_MCP_ALLOWED_DIRS is not configured
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-43901.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2026-43901 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,333 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
wireshark-mcpReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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_files -
editcap_trim -
editcap_split -
editcap_time_shift -
editcap_deduplicate -
text2pcap_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–543 -
src/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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | wireshark-mcp | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wireshark-mcp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
No patched version of wireshark-mcp has shipped for CVE-2026-43901 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-43901 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-43901. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2026-43901 in your dependencies?
O3 Security finds CVE-2026-43901 across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.