Summary
HackMD MCP Server has Server-Side Request Forgery (SSRF) vulnerability
Workarounds
Users can mitigate this vulnerability without upgrading by:
- Use stdio mode instead of HTTP mode: Set
TRANSPORT=stdioor remove theTRANSPORTenvironment variable to disable HTTP mode entirely - Network-level restrictions: Use firewall rules or network policies to restrict outbound connections from the server
- Reverse proxy filtering: Place the MCP server behind a reverse proxy that validates and filters both the
Hackmd-Api-Urlheader and the base64-encoded JSONconfigquery parameter to prevent malicioushackmdApiUrlvalues
References
Impact
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.
Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The vulnerability has been patched in version 1.5.0. Users should:
- Update to the latest version of the HackMD MCP server
- Set the
ALLOWED_HACKMD_API_URLSenvironment variable to restrict allowed HackMD API endpoints - If not set, the server will default to only allowing the official HackMD API URL (
https://api.hackmd.io/v1)
Example configuration:
ALLOWED_HACKMD_API_URLS=https://api.hackmd.io/v1,https://your-hackmd-instance.com/api/v1
Frequently Asked Questions
- What is CVE-2025-59155? CVE-2025-59155 is a medium-severity server-side request forgery (SSRF) vulnerability in hackmd-mcp (npm), affecting versions >= 1.4.0, < 1.5.0. It is fixed in 1.5.0. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.
- Which versions of hackmd-mcp are affected by CVE-2025-59155? hackmd-mcp (npm) versions >= 1.4.0, < 1.5.0 is affected.
- Is there a fix for CVE-2025-59155? Yes. CVE-2025-59155 is fixed in 1.5.0. Upgrade to this version or later.
- Is CVE-2025-59155 exploitable, and should I be worried? Whether CVE-2025-59155 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-59155 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-59155? Upgrade
hackmd-mcpto 1.5.0 or later.