CVE-2026-7158: mcp-url-downloader has a Server-Side Request Forgery issue
mcp-url-downloader (dmitryglhf's url-download-mcp) can be pushed into fetching internal addresses. `_validate_url_safe` in `server.py` checks only the first URL's hostname, and the HTTP client follows redirects unchecked. A public URL that redirects to 127.0.0.1 or 169.254.169.254 passes and its response is saved to disk. A public exploit exists. No patched version is listed.
Published Apr 27, 2026 · Updated May 6, 2026 · Analysis Oct 29, 2026
What an attacker can do
The tools download_single_file and download_files fetch a URL and write the response to an output directory. _validate_url_safe() resolves and checks only the hostname the caller supplies. The client then fetches with redirect following enabled, for both the HEAD request and the streaming GET. A publicly resolvable host can answer with a 302 or 307 whose Location points at 127.0.0.1, a private RFC1918 address or the cloud metadata address 169.254.169.254. The client follows it without a second check, and the internal response lands in the output folder.
The upstream report rates confidentiality impact high: cloud metadata credentials, loopback admin panels and internal APIs can be read through the saved file. State-changing internal services could be hit with GET requests. The reporter suggests a CVSS 3.1 score of 8.6, while the advisory data shows 7.3.
Any client that can call the tool can use it, including an AI agent following injected instructions from a web page. The attacker needs a public URL they control that returns a redirect. The report does not claim DNS rebinding, and the reporter did not reproduce the bypass dynamically.
Who is affected
mcp-url-downloader (pip) 0.1.0 and earlier, up to commit 4b8cf2de55f6e8864a77d108e8a94a5b8e4394c6. The project is a rolling release, and the report says the affected range still needs checking against its release history.
pip show mcp-url-downloaderCheck whether the host it runs on can reach cloud metadata services or internal admin panels, since those set the damage.
mcp-url-downloader
- Ecosystem
- PyPI
- Affected
- <= 0.1.0
- Fixed in
- No patched version yet
- Check
pip show mcp-url-downloader
How to fix it
No patched version exists, and the maintainer had not responded to the upstream issue. The reporter suggests setting follow_redirects=False, or following redirects manually and running the same checks on every hop. They also suggest checking the actual connected IP, and applying this to both HEAD and GET.
Interim steps from the report:
- Restrict who can call
download_single_fileanddownload_files. - Disable redirect following and reject non-2xx responses.
On cloud hosts, requiring metadata service tokens (for example IMDSv2) or blocking the metadata address from the process also limits the harm. That step is our suggestion, not the report's.
How to tell if you were hit
Review MCP tool-call logs for download_single_file and download_files URLs that point at hosts you do not recognize. Then check the output directory for saved files that contain cloud metadata, such as instance credentials, or internal service pages. Network logs from the host showing a request to an external address followed by connections to 127.0.0.1, private ranges or 169.254.169.254 from the same process point to the redirect trick. The advisory names no log signature.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
A vulnerability has been found in dmitryglhf mcp-url-downloader up to 4b8cf2de55f6e8864a77d108e8a94a5b8e4394c6. Affected by this issue is the function _validate_url_safe of the file src/mcp_url_downloader/server.py. Such manipulation of the argument url leads to server-side request forgery. The attack can be executed remotely. The exploit has been disclosed to the public and may be used. This product implements a rolling release for ongoing delivery, which means version information for affected or updated releases is unavailable. The project was informed of the problem early through an issue report but has not responded yet.
Questions
- Is there a fixed version of mcp-url-downloader for CVE-2026-7158?
No. The advisory lists no patched version, the project is a rolling release and the maintainer had not replied to the issue.
- How does the bypass work?
Only the first hostname is validated. A public URL redirects to an internal address and the client follows it, so the internal response is downloaded.
- Can an AI agent be made to trigger it?
Yes. Any client that can call the download tools can pass the URL, including an agent following instructions injected through content it read.
- Is DNS rebinding part of this advisory?
The report does not claim it. It describes the redirect path as the main bypass and leaves DNS rebinding as an untested possibility.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-102943
Dagu MCP DAG specification read bypasses path containment and workspace isolation
medium6.5Nov 10, 2026CVE-2026-102610
fast-agent: `fast-agent serve` binds HTTP to 0.0.0.0 with no authentication by default; with --shell this is unauthenticated remote command execution
medium6.4Nov 9, 2026CVE-2026-63655
tsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS
high7.5Nov 9, 2026CVE-2026-76892
tsParticles: Malformed JSON requests can terminate the @tsparticles/mcp-server HTTP process
high8.7Nov 9, 2026CVE-2026-76893
tsParticles: A single anonymous MCP session can monopolize HTTP mode and deny new clients
medium6.9Nov 9, 2026CVE-2026-77604
Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read
high7.5Nov 9, 2026
