/

CVE-2026-46555

Severity:

HIGH RISK

(7.7)

Auth & Path Bypass (CWE-22/306) in WhatsApp MCP

CVE-2026-46555

Analyzed

Vulnerability type

Category:

Authentication and Path Validation Flaws

CWE:

CWE-22, CWE-306, CWE-346

Impact:

Unauthorized Message Sending and Local File Exfiltration

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

WhatsApp MCP Server's whatsapp-bridge HTTP API exposes an unauthenticated local endpoint that accepts arbitrary absolute file paths for media attachments, without host header validation.

When the bridge is running, any local process—or a remote site via DNS rebinding—can send WhatsApp messages from the paired account and exfiltrate arbitrary readable files as document attachments.

Affected context

This vulnerability affects environments where the WhatsApp MCP Server bridge is running with its HTTP API bound to 127.0.0.1:8080 and accessible to other processes of the same user.

It is most relevant when the bridge process has access to sensitive local files (e.g., SSH keys, browser data, source code) and is used alongside other MCP servers, IDE extensions, or tools that can issue HTTP requests.

Risk increases when users browse untrusted websites while the bridge is active, due to the lack of Host header validation enabling DNS rebinding attacks.

Exploit preconditions

  • Attack surface: Local loopback HTTP API (127.0.0.1:8080) and browser-accessible origin for DNS rebinding.
  • Required access (local): Any process running as the same OS user, including sibling MCP servers, IDE plugins, or tool flows capable of making HTTP calls.
  • Required access (remote): Ability to lure the user to a malicious webpage capable of DNS rebinding to the loopback address.
  • Trigger points:
  • Calling /api/send to send messages or attach documents.
  • Supplying an absolute media_path pointing to sensitive files on disk.
  • Why exploitation is possible: The bridge accepts unauthenticated requests, does not validate the Host header, and does not constrain media_path to a safe directory, allowing arbitrary file reads and unauthorized message sending.

Why this happens

The core issues fall under missing enforcement of access control and improper path handling:

  • Missing authorization (CWE-306): The bridge HTTP API accepts any request from localhost without authentication, assuming that local callers are inherently trusted. This breaks the assumption once multiple tools, services, or browser contexts share the same user session.
  • Improper path validation (CWE-22): The /api/send endpoint accepts absolute media_path values and does not confine them to a dedicated media directory or guard against traversal, allowing callers to reference arbitrary files readable by the process.
  • Insufficient Host header validation (CWE-346): The service trusts incoming Host headers and does not enforce an allow-list, making it susceptible to DNS rebinding attacks where a browser-origin request is silently redirected to the local service.

Abstractly, the design assumed that "localhost equals trusted," did not narrow the file access scope, and relied on weak request origin signals, creating a composite access control failure.

Potential impact

  • An attacker may send WhatsApp messages from the victim's paired account without their consent.
  • Local or rebinding-based attackers could exfiltrate arbitrary files readable by the bridge process (e.g., SSH private keys, browser profiles, application secrets, dotfiles).
  • Tools or extensions running in the user's MCP environment could unintentionally act as conduits for data leakage or unauthorized messaging.
  • Compromise of other accounts or systems due to leaked credentials and keys taken from the victim's filesystem.
  • Loss of privacy from exposure of personal documents, chat logs, or source code repositories.

General mitigation guidance

Effective mitigation focuses on tightening access control, constraining file access, and hardening origin validation:

  • Introduce strong authentication on local HTTP APIs (e.g., bearer tokens, scoped credentials) and treat localhost callers as untrusted by default.
  • Constrain file parameters like media_path to a specific root directory, rejecting absolute paths and path traversal sequences.
  • Enforce strict Host header allow-listing and origin expectations, reducing DNS rebinding risk for browser-mediated requests.
  • Run bridge-like services with least privilege, in dedicated accounts or containers, limiting read access to only necessary files.
  • Consider secure-by-default configurations where sensitive endpoints are disabled or tightly scoped unless explicitly configured.

How teams detect issues like this

Detection typically involves a mix of configuration review, code analysis, and runtime monitoring:

  • Use static analysis or manual review to flag HTTP handlers that:
  • Omit authentication and authorization checks.
  • Accept filesystem paths from client input without normalization and confinement.
  • Trust Host headers or origin information without allow-listing.
  • Review service configuration for loopback-bound APIs that are implicitly trusted and lack explicit access controls.
  • Implement logging of /api/send calls, including caller context and requested media_path, and monitor for suspicious patterns (e.g., access to .ssh or browser profile directories).
  • Integrate security checks into CI pipelines to enforce policies such as "no unauthenticated write endpoints" and "no direct absolute path usage from HTTP parameters."

Sources

SourceLink
github.comgithub.com/verygoodplugins/whatsapp-mcp/blob/main/SECURITY.md
github.comgithub.com/verygoodplugins/whatsapp-mcp/releases/tag/v0.2.1
github.comgithub.com/verygoodplugins/whatsapp-mcp/security/advisories/GHSA-7jj9-4qqq-4xc4

Frequently asked

questions

Exploitation is broad wherever the bridge runs with access to sensitive files and an unauthenticated HTTP API. Any local process under the same user—and remote attackers via DNS rebinding—can invoke the vulnerable endpoints while the bridge is active.

Not necessarily. Local processes do not need additional credentials beyond running as the same user. Remote attackers can exploit the issue by getting the victim to visit a malicious webpage that performs DNS rebinding and calls the local bridge API.

Require strong authentication for all state-changing or data-accessing endpoints, never assume localhost callers are trusted, strictly confine file path parameters to controlled directories, and validate Host headers and origins against an explicit allow-list.

Treat local services as part of a shared, potentially hostile environment; design APIs with explicit authorization, least-privilege file access, and secure-by-default configurations. Complement this with automated checks in development pipelines to catch unauthenticated endpoints and unsafe path handling early.

Find out what's already
exploitable in your codebase.