Skip to main content

wireshark-mcp CVE-2026-43901

MEDIUM
Path Traversal (CWE-22)
2026-05-05 https://github.com/bx33661/Wireshark-MCP GHSA-3r68-x3xc-rxpg
6.8
CVSS 3.1 · Vendor: https://github.com/bx33661/Wireshark-MCP
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker crafts malicious pcap with HTTP object
  2. Delivery
    Attacker delivers pcap to target system or monitoring segment
  3. Exploit
    AI model processes pcap via wireshark-mcp MCP client
  4. Install
    Prompt injection in pcap metadata manipulates model decision
  5. C2
    Model calls wireshark_export_objects with dest_dir=/home/user/.ssh/
  6. Execute
    MCP server accepts path (WIRESHARK_MCP_ALLOWED_DIRS=None) and creates directory
  7. Impact
    tshark extracts HTTP object and writes to arbitrary filesystem path
  8. Step 8
    Attacker 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypi wireshark-mcp no fix

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

Vendor (https://github.com/bx33661/Wireshark-MCP) PRIMARY 6.8 MEDIUM
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

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

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):

python

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:

bash

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:

python

_allowed_dirs = None

---

Patches

Not yet patched.

A fix should make the path sandbox mandatory for all file-write operations rather than optional:

python
# 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:

bash

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.py lines 521-543
  • src/wireshark_mcp/tshark/client.py lines 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

EPSS Score
0.0%
Top 86% exploitable
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

pkg:pip/wireshark-mcp

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy