UTC
Medium

HackMD MCP Server has Server-Side Request Forgery (SSRF) vulnerability

CVE-2025-59155 · GHSA-g5cg-6c7v-mmpw · published 2025-09-15

Severity
Medium
CVSS score
6.9
Chance of exploitation (EPSS)
0.36%
Fixed in
1.5.0
  • Exploitation No known exploitation
  • Automatable Yes
  • Technical impact Partial
  • CISA SSVC
What it is

A Server-Side Request Forgery (SSRF) vulnerability that affects all users running the HackMD MCP server in HTTP mode. Attackers could exploit this vulnerability by passing arbitrary hackmdApiUrl values through HTTP headers (Hackmd-Api-Url) or base64-encoded JSON query parameters. This allows malicious users to: Redirect API calls to internal network services Potentially access sensitive internal endpoints Perform network reconnaissance through the server Bypass network access controls The vulnerability affects the HTTP transport mode specifically - stdio mode is not impacted as it only accepts requests from stdio.

What to do

Upgrade hackmd-mcp to 1.5.0 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

The vulnerability has been patched in version 1.5.0. Users should: 1. Update to the latest version of the HackMD MCP server 2. Set the ALLOWEDHACKMDAPI_URLS environment variable to restrict allowed HackMD API endpoints 3. If not set, the server will default to only allowing the official HackMD API URL (https://api.hackmd.io/v1) Example configuration:

If you cannot upgrade yet

Users can mitigate this vulnerability without upgrading by: 1. Use stdio mode instead of HTTP mode: Set TRANSPORT=stdio or remove the TRANSPORT environment variable to disable HTTP mode entirely 2. Network-level restrictions: Use firewall rules or network policies to restrict outbound connections from the server 3. Reverse proxy filtering: Place the MCP server behind a reverse proxy that validates and filters both the Hackmd-Api-Url header and the base64-encoded JSON config query parameter to prevent malicious hackmdApiUrl values

Affected
PackageRegistryAffectedFixed in
hackmd-mcpnpm>= 1.4.0, < 1.5.01.5.0

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].