The vulnerability (CVE-2025-5276) is a Server-Side Request Forgery (SSRF) in mcp-markdownify-server. The core issue is insufficient validation of user-supplied URLs before the server makes requests to these URLs.
The vulnerability description explicitly identifies Markdownify.get() as the vulnerable function. This function likely serves as an entry point that processes user input and can invoke various tools.
The provided patch (commit 0284aa8f34d32c65e20d8cda2d429b7943c9af03) modifies the createServer() function in src/server.ts. Specifically, it adds URL validation (checking for allowed schemes like 'http:', 'https:' and using is_ip_private to block requests to private IP addresses) for the WebpageToMarkdownTool. This indicates that, prior to the patch, createServer() would pass unvalidated URLs from user input to the Markdownify.toMarkdown() function when this tool was invoked.
Therefore, three key functions are involved in the vulnerability:
Markdownify.get(): The primary entry point mentioned in the CVE, which processes potentially malicious prompts.
createServer(): This function, in its pre-patch state, contained the flawed logic for the WebpageToMarkdownTool where it failed to validate URLs.
Markdownify.toMarkdown(): This function performs the actual fetching of the URL content. When supplied with an unvalidated, malicious URL by createServer(), it executes the SSRF attack.
During exploitation, these functions would likely appear in a runtime profile or stack trace. The patch addresses the vulnerability for one specific tool (WebpageToMarkdownTool) by adding checks in createServer(). The vulnerability description also mentions bing-search-to-markdown and youtube-to-markdown tools; if these are also invoked via Markdownify.get() and make external requests without similar validation, they might also be vulnerable, though the provided patch does not cover them.