Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-g5cg-6c7v-mmpw
No affected components available
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.
Patches
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
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
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability.
Limited exploitation activity has been observed. Close monitoring and planned remediation are recommended.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard