Skip to content
GitHub Security Advisory published September 3, 2026

GitHub Security Advisory published September 3, 2026

github.com • October 5, 2026

Reporter: Syed Anas Mohiuddin — independent security researcher, maintainer of mcp-safeguard (an open-source MCP security scanner).

Target: INFOKOM-KI/Wazuh-MCP-Server Commit: 6bd1fa8

Patched version : 2bbfe12

Wazuh-MCP-Server is a 132-tool "blue team" MCP server that gives an MCP client (Claude Desktop or any other MCP host) deep, largely read/write access into a live Wazuh SIEM deployment, plus a set of forensic/threat-intel helper tools. One of those tools, blueteam_check_webshell , is explicitly designed to fetch an attacker-influenced URL: its own docstring says it exists to "confirm whether a webshell is actively hosted" by feeding it "raw unmasked URLs from blueteam_wazuh_export " — i.e. URLs recovered from real incident/forensic data, not just URLs an analyst types by hand.

The tool's Pydantic input validator advertises SSRF protection ("Private/reserved IPs in the URL host are rejected") but the check only inspects the URL string for a literal IP address. If the host is a domain name — including a domain the attacker fully controls, or a public DNS-rebinding-style domain — the check is skipped entirely ( ip = None # not an IP - domain name, allowed ), and the server then runs curl against that domain, which performs its own DNS resolution and connects to whatever the attacker's DNS answer says, including 127.0.0.1 , RFC1918 addresses, or the cloud-metadata address 169.254.169.254 .

mcp_server/tools/webshell_check.py , the WebshellCheckInput.validate_url field validator:

ipaddress.ip_address(host) raises ValueError for anything that isn't a literal IPv4/IPv6 string, and the except branch explicitly treats that as "domain name, allowed" — no DNS resolution, no re-check, no rejection. The docstring on the tool itself states: "SSRF Protection: Private/reserved IPs in the URL host are rejected." That claim is false for the (overwhelmingly common) case of a hostname rather than a literal IP.

The URL that passes this "protection" is then handed straight to curl as an argv element (not shell-interpolated, so this is not a command-injection bug — it is a pure SSRF/host-validation bug):

curl -L also means that even a URL whose original host looked benign will follow redirects to any target with zero re-validation, compounding the same gap.

The response is then parsed for HTTP status, content-type, and size, and — for anything matching one of the webshell/login-page signature regexes — up to 1,500 characters of HTML (title, headings, form fields) is returned to the calling MCP client ( _extract_login_context ).

The check is a pure, side-effect-free Pydantic validator, so it can be exercised directly without standing up the full server. The validator code below is copied verbatim from the audited commit; only the surrounding class/imports were trimmed to a minimal standalone repro:

Actual output (run with pydantic==2.13.4 , the version this environment has installed):

127.0.0.1.nip.io and localtest.me are real, public, third-party wildcard-DNS services that resolve straight to 127.0.0.1 — independently confirmed with a live DNS lookup immediately before writing this report:

So blueteam_check_webshell(url=" /") (or any attacker-registered domain pointed at an internal address) passes validation and curl will connect to whatever that name resolves to at request time — completing a full, working SSRF against the host running the MCP server.

blueteam_check_webshell is one of 132 tools this server exposes to an MCP client, in a product explicitly built for CSIRT/SOC use — i.e. deployed with real network reach into a SIEM environment (the Wazuh Manager API, the OpenSearch-backed indexer, and whatever else shares a network with the host running this server, potentially including cloud instance metadata if hosted on AWS/GCP/Azure). A caller of this tool can:

Perform internal network/service reconnaissance: HTTP status code, content-type, size, and curl's exit code are always returned, enough to fingerprint which internal hosts/ports are alive and what kind of service is listening.

Reach cloud instance metadata endpoints or other internal-only HTTP services that the operator never intended this tool to touch.

Partially exfiltrate response content: when the response matches any of the tool's own webshell/login-page detection signatures (a broad set including any generic or pattern), up to 1,500 characters of the actual HTML — title, headings, form fields — is returned in the tool's markdown output.

Because -L is passed to curl, even a URL that looks benign at submission time can redirect server-side to an internal target with no re-validation at all.

This directly contradicts the tool's own documented guarantee ("SSRF Protection: Private/reserved IPs in the URL host are rejected") for the overwhelmingly common case of a URL that uses a hostname rather than a bare IP literal.

Resolve the hostname to its A/AAAA records and reject the request if any resolved address is private/loopback/link-local/reserved. Re-run that check on every redirect hop before it is followed (or drop -L and don't auto-follow), and ideally pin the already-validated IP for the actual connection (e.g. curl --resolve host:port:IP ) to close the TOCTOU window between the validation lookup and the connection.

I'd appreciate being credited under my full name, Syed Anas Mohiuddin, as an independent security researcher and the maintainer of mcp-safeguard (an open-source MCP security scanner), on this advisory. I'd also like to request a CVE ID for this finding once you're ready to publish — GitHub gives you that option from the advisory page when you publish it.

Extracted Entities