hackmd-mcp
Affected
- introduced
1.4.0, fixed1.5.0(semver)
Fixed versions
1.5.0
Fix
- Fixed version
1.5.0npm install [email protected]
Advisory
Also known as: CVE-2025-59155
HackMD MCP Server has Server-Side Request Forgery (SSRF) vulnerability
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:
The vulnerability affects the HTTP transport mode specifically - stdio mode is not impacted as it only accepts requests from stdio.
Patches
The vulnerability has been patched in version 1.5.0. Users should:
ALLOWED_HACKMD_API_URLS environment variable to restrict allowed HackMD API endpointshttps://api.hackmd.io/v1)Example configuration:
ALLOWED_HACKMD_API_URLS=https://api.hackmd.io/v1,https://your-hackmd-instance.com/api/v1
Workarounds
Users can mitigate this vulnerability without upgrading by:
TRANSPORT=stdio or remove the TRANSPORT environment variable to disable HTTP mode entirelyHackmd-Api-Url header and the base64-encoded JSON config query parameter to prevent malicious hackmdApiUrl valuesReferences
Medium Basis: The source's own band: MODERATE
1.4.0, fixed 1.5.0 (semver)1.5.0
1.5.0npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0