Server-side Request Forgery (SSRF) Affecting hackmd-mcp package, versions >=1.4.0 <1.5.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.33% (26th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-HACKMDMCP-12705382
  • published16 Sept 2025
  • disclosed15 Sept 2025
  • creditUnknown

Introduced: 15 Sep 2025

CVE-2025-59155  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade hackmd-mcp to version 1.5.0 or higher.

Overview

hackmd-mcp is an A Model Context Protocol server for integrating HackMD's note-taking platform with AI assistants.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the hackmdApiUrl parameter in HTTP transport mode. An attacker can access internal network resources, perform network reconnaissance, and bypass network access controls by supplying arbitrary values through the Hackmd-Api-Url HTTP header or a base64-encoded JSON query parameter.

Workarounds

  1. Switch to stdio mode by setting TRANSPORT=stdio or removing the TRANSPORT environment variable to disable HTTP mode.

  2. Restrict outbound server connections using firewalls or network policies.

  3. Deploy a reverse proxy in front of the MCP server to validate and filter the Hackmd-Api-Url header and the base64-encoded JSON config query parameter, blocking potentially dangerous hackmdApiUrl values.

References

CVSS Base Scores

version 4.0
version 3.1