CVE-2026-145358 in markdownify-mcp
Summary
by MITRE • 12/05/2026
markdownify-mcp before 2.0.0 contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust server memory or hang requests by supplying URLs to slow or oversized responses. Attackers can steer an LLM agent via prompt injection into calling webpage-to-markdown or related tools, causing safeFetch() to buffer unbounded bodies without timeout and crash the MCP server.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 12/05/2026
The vulnerability identified in markdownify-mcp versions prior to 2.0.0 represents a critical uncontrolled resource consumption flaw that stems from inadequate input validation and missing defensive controls when handling external web resources. This security defect allows remote attackers to trigger denial-of-service conditions by exploiting the way the application processes URLs provided through its interface, specifically within the context of Large Language Model agent workflows. The core technical issue lies in the safeFetch function, which is designed to retrieve content from specified Uniform Resource Locators and convert it into Markdown format for downstream processing. However, this function lacks essential safeguards such as response body size limits or connection timeouts, creating a scenario where the application will attempt to buffer an entire HTTP response payload entirely within server memory regardless of its magnitude.
When an attacker supplies URLs that point to servers configured to send extremely large responses or those that deliberately delay data transmission, the safeFetch function proceeds without any mechanism to cap the amount of data read from the network stream. This behavior results in unbounded memory allocation as the application attempts to store potentially gigabytes of text data into RAM. In environments where markdownify-mcp is integrated with LLM agents, this vulnerability can be weaponized through prompt injection attacks. An adversary who has gained some level of influence over the agent's input prompts can instruct the AI to invoke webpage-to-markdown tools or similar utilities that rely on this vulnerable fetching mechanism. By directing the agent to process maliciously crafted URLs, the attacker forces the server into a state of resource exhaustion.
The operational impact of this vulnerability is severe, primarily manifesting as service degradation and complete system unavailability for legitimate users. As the server memory fills up due to the accumulation of buffered response bodies, the application may experience significant latency spikes followed by an out-of-memory crash or termination by the operating system's kernel protection mechanisms. This effectively hangs requests and disrupts any dependent services that rely on the markdown conversion functionality. The lack of a timeout mechanism means that even if the server does not immediately run out of memory, it will remain blocked waiting for data from slow-loris style attacks, tying up worker threads or asynchronous event loop handles indefinitely.
From a classification perspective, this vulnerability aligns with CWE-400 Uncontrolled Resource Consumption and CWE-770 Allocation of Resources Without Limits or Throttling in the Common Weakness Enumeration taxonomy. It also maps to MITRE ATT&CK technique T1496 Resource Hijacking, specifically under sub-techniques involving denial-of-service via resource exhaustion. The attack vector leverages the trust placed in user-supplied URLs within an automated agent context, highlighting the risks associated with allowing AI agents to perform unrestricted network operations without strict sandboxing or rate limiting policies.
To mitigate this vulnerability, immediate remediation requires upgrading to version 2.0.0 of markdownify-mcp where these controls have presumably been addressed. For systems that cannot immediately upgrade, defensive measures must be implemented at the infrastructure level. This includes configuring reverse proxies such as Nginx or Apache to enforce strict limits on request body sizes and connection timeouts for any traffic directed toward the markdownify service. Additionally, implementing application-level safeguards is crucial; developers should introduce explicit byte-size thresholds for response buffering and configure timeout parameters that abort requests exceeding a reasonable duration. Integrating these controls ensures that even if an attacker attempts to exploit this flaw through prompt injection or direct API calls, the server will reject oversized payloads or terminate slow connections before they can consume critical system resources.