Server-Side Request Forgery in HackMD's Model Context Protocol Server
CVE-2025-59155
What is CVE-2025-59155?
The hackmd-mcp (Model Context Protocol server) is vulnerable to a Server-Side Request Forgery (SSRF) issue when running in HTTP transport mode. This vulnerability affects versions 1.4.0 through 1.4.x, allowing attackers to submit unvalidated hackmdApiUrl values via the Hackmd-Api-Url HTTP header or through base64-encoded JSON query parameters. By exploiting this flaw, attackers can redirect outbound API requests to internal services, potentially leading to unauthorized access to sensitive internal endpoints, performing network reconnaissance, and circumventing established network access controls. Users are encouraged to upgrade to version 1.5.0 or later, which introduces validation mechanisms and supports environment variable-based constraints for API URLs. Alternative mitigation strategies include switching to stdio transport mode, limiting outbound network access, or implementing filtering via a reverse proxy.
Affected Version(s)
hackmd-mcp >= 1.4.0, < 1.5.0