CVE-2025-59155: Hackmd mcp HackMD MCP Server Has Server-Side Vulnerability

MODERATE
Advisory Identifier: GHSA-g5cg-6c7v-mmpw
CWE-918
Published
Advisory Summary

CVE-2025-59155 is a MODERATE hackmd mcp server has server-side vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Hackmd mcp libraries in the npm ecosystem. The issue involves hackmd mcp server has server-side request forgery (ssrf) vulnerability. Remediation is available by upgrading affected packages to version 1.5.0.

CVE-2025-59155 at a Glance

CVE Identifier CVE-2025-59155
GHSA Identifier GHSA-g5cg-6c7v-mmpw
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Hackmd mcp
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-59155

To remediate this vulnerability, upgrade all affected Hackmd mcp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

hackmd-mcp fixed: 1.5.0
npm install hackmd-mcp@1.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls hackmd-mcp

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-59155, inspect your project dependencies using npm:

npm ls hackmd-mcp

Analyze the terminal output to locate any version of Hackmd mcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.0), your application is affected.

Note: The npm ls hackmd-mcp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Hackmd mcp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: 1. Update to the latest version of the HackMD MCP server 2. Set the `ALLOWED_HACKMD_API_URLS` environment variable to restrict allowed HackMD API endpoints 3. 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: 1. **Use stdio mode instead of HTTP mode**: Set `TRANSPORT=stdio` or remove the `TRANSPORT` environment variable to disable HTTP mode entirely 2. **Network-level restrictions**: Use firewall rules or network policies to restrict outbound connections from the server 3. **Reverse proxy filtering**: Place the MCP server behind a reverse proxy that validates and filters both the `Hackmd-Api-Url` header and the base64-encoded JSON `config` query parameter to prevent malicious `hackmdApiUrl` values ### References - [OWASP Server-Side Request Forgery Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html) - [HackMD MCP Server Documentation](https://github.com/yuna0x0/hackmd-mcp)

CVE-2025-59155 Affected Hackmd mcp Versions

1 component(s)
Fixed Versions:
1.5.0
Product / Package Ecosystem Affected Versions Fixed Version
hackmd-mcp
npm
≥ 1.4.0
< 1.5.0
1.5.0

References

Frequently Asked Questions

What is CVE-2025-59155?
CVE-2025-59155 is a security vulnerability in Hackmd mcp involving HackMD MCP Server has Server-Side Request Forgery (SSRF) vulnerability under CWE-918: Server-Side Request Forgery (SSRF).
Which Hackmd mcp versions are affected?
Affected versions include releases prior to 1.5.0 across affected packages: hackmd-mcp.
What version fixes CVE-2025-59155?
Upgrading to 1.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hackmd-mcp affected?
Yes, hackmd-mcp is affected in releases prior to 1.5.0. Upgrade your dependency to 1.5.0 or later.
What CWE is associated with CVE-2025-59155?
CVE-2025-59155 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2025-59155?
Run the dependency tree command: 'npm ls hackmd-mcp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g5cg-6c7v-mmpw",
  "modified" : "2025-09-15T20:37:46Z",
  "published" : "2025-09-15T20:37:46Z",
  "aliases" : [ "CVE-2025-59155" ],
  "summary" : "HackMD MCP Server has Server-Side Request Forgery (SSRF) vulnerability",
  "details" : "### Impact\n\nA 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:\n\n- Redirect API calls to internal network services\n- Potentially access sensitive internal endpoints\n- Perform network reconnaissance through the server\n- Bypass network access controls\n\nThe vulnerability affects the HTTP transport mode specifically - stdio mode is not impacted as it only accepts requests from stdio.\n\n### Patches\n\nThe vulnerability has been patched in version `1.5.0`. Users should:\n\n1. Update to the latest version of the HackMD MCP server\n2. Set the `ALLOWED_HACKMD_API_URLS` environment variable to restrict allowed HackMD API endpoints\n3. If not set, the server will default to only allowing the official HackMD API URL (`https://api.hackmd.io/v1`)\n\nExample configuration:\n```\nALLOWED_HACKMD_API_URLS=https://api.hackmd.io/v1,https://your-hackmd-instance.com/api/v1\n```\n\n### Workarounds\n\nUsers can mitigate this vulnerability without upgrading by:\n\n1. **Use stdio mode instead of HTTP mode**: Set `TRANSPORT=stdio` or remove the `TRANSPORT` environment variable to disable HTTP mode entirely\n2. **Network-level restrictions**: Use firewall rules or network policies to restrict outbound connections from the server\n3. **Reverse proxy filtering**: Place the MCP server behind a reverse proxy that validates and filters both the `Hackmd-Api-Url` header and the base64-encoded JSON `config` query parameter to prevent malicious `hackmdApiUrl` values\n\n### References\n\n- [OWASP Server-Side Request Forgery Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html)\n- [HackMD MCP Server Documentation](https://github.com/yuna0x0/hackmd-mcp)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "hackmd-mcp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/yuna0x0/hackmd-mcp/security/advisories/GHSA-g5cg-6c7v-mmpw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59155"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yuna0x0/hackmd-mcp/commit/43936c78a5bb3dedc74e8f080607a1125caa8c13"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/yuna0x0/hackmd-mcp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yuna0x0/hackmd-mcp/releases/tag/v1.5.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-15T20:37:46Z",
    "nvd_published_at" : "2025-09-15T17:15:36Z"
  }
}