What 17,845 GitHub Repos Taught Us About Malicious MCP Servers

📡 VirusTotal Blog · 2025-06-04

What 17,845 GitHub Repos Taught Us About Malicious MCP Servers

What 17,845 GitHub Repos Taught Us About Malicious MCP Servers ~ VirusTotal Blog Popular Posts An update from VirusTotal Our goal is simple: to help keep you safe on the web. And we’ve worked hard to ensure that the services we offer continually improve. But as... From Automation to Infection: How OpenClaw AI Agent Skills Are Being Weaponized The fastest-growing personal AI agent ecosystem just became a new delivery channel for malware. Over the last few days, VirusTotal has detec... VTPRACTITIONERS{ACRONIS}: Tracking FileFix, Shadow Vector, and SideWinder Introduction We have recently started a new blog series called #VTPRACTITIONERS. This series aims to share with the community what other pr... Blog Archive ►  2026 (5) ►  June 2026 (1) ►  April 2026 (1) ►  February 2026 (2) ►  January 2026 (1) ▼  2025 (17) ►  December 2025 (1) ►  November 2025 (3) ►  October 2025 (4) ►  September 2025 (3) ►  August 2025 (3) ▼  June 2025 (2) YARA-X 1.0.0: The Stable Release and Its Advantages What 17,845 GitHub Repos Taught Us About Malicious... ►  January 2025 (1) ►  2024 (18) ►  November 2024 (1) ►  October 2024 (1) ►  September 2024 (1) ►  August 2024 (2) ►  May 2024 (5) ►  April 2024 (2) ►  March 2024 (2) ►  February 2024 (2) ►  January 2024 (2) ►  2023 (35) ►  December 2023 (5) ►  November 2023 (3) ►  October 2023 (2) ►  September 2023 (1) ►  August 2023 (2) ►  July 2023 (5) ►  June 2023 (5) ►  May 2023 (3) ►  April 2023 (3) ►  March 2023 (2) ►  February 2023 (2) ►  January 2023 (2) ►  2022 (23) ►  December 2022 (1) ►  November 2022 (6) ►  October 2022 (1) ►  September 2022 (1) ►  August 2022 (3) ►  July 2022 (1) ►  May 2022 (1) ►  April 2022 (2) ►  March 2022 (3) ►  February 2022 (2) ►  January 2022 (2) ►  2021 (19) ►  December 2021 (2) ►  November 2021 (4) ►  October 2021 (3) ►  September 2021 (2) ►  August 2021 (2) ►  July 2021 (1) ►  May 2021 (2) ►  March 2021 (1) ►  February 2021 (1) ►  January 2021 (1) ►  2020 (15) ►  December 2020 (2) ►  November 2020 (3) ►  October 2020 (2) ►  August 2020 (1) ►  June 2020 (1) ►  May 2020 (1) ►  February 2020 (3) ►  January 2020 (2) ►  2019 (19) ►  November 2019 (2) ►  October 2019 (4) ►  July 2019 (1) ►  June 2019 (2) ►  May 2019 (3) ►  April 2019 (1) ►  March 2019 (2) ►  February 2019 (2) ►  January 2019 (2) ►  2018 (10) ►  December 2018 (1) ►  November 2018 (1) ►  June 2018 (1) ►  May 2018 (1) ►  April 2018 (3) ►  March 2018 (1) ►  January 2018 (2) ►  2017 (13) ►  November 2017 (1) ►  October 2017 (2) ►  September 2017 (1) ►  August 2017 (1) ►  July 2017 (2) ►  March 2017 (4) ►  February 2017 (2) ►  2016 (6) ►  November 2016 (2) ►  August 2016 (2) ►  May 2016 (1) ►  January 2016 (1) ►  2015 (8) ►  November 2015 (1) ►  October 2015 (1) ►  June 2015 (2) ►  April 2015 (1) ►  February 2015 (1) ►  January 2015 (2) ►  2014 (24) ►  December 2014 (1) ►  November 2014 (3) ►  October 2014 (1) ►  September 2014 (1) ►  July 2014 (6) ►  June 2014 (4) ►  May 2014 (4) ►  February 2014 (3) ►  January 2014 (1) ►  2013 (26) ►  November 2013 (2) ►  October 2013 (7) ►  September 2013 (4) ►  June 2013 (1) ►  May 2013 (2) ►  April 2013 (5) ►  March 2013 (2) ►  February 2013 (2) ►  January 2013 (1) ►  2012 (26) ►  December 2012 (1) ►  November 2012 (4) ►  October 2012 (2) ►  September 2012 (3) ►  August 2012 (2) ►  July 2012 (2) ►  June 2012 (6) ►  May 2012 (2) ►  April 2012 (2) ►  March 2012 (1) ►  February 2012 (1) ►  2011 (1) ►  December 2011 (1) Twitter Github YouTube Search Widgets Connect Search Wednesday, June 04, 2025 What 17,845 GitHub Repos Taught Us About Malicious MCP Servers Wednesday, June 04, 2025 Bernardo.Quintero Leave a comment Spoiler: VirusTotal Code Insight’s preliminary audit flagged nearly 8% of MCP (Model Context Protocol) servers on GitHub as potentially forged for evil, though the sad truth is, bad intentions aren’t required to follow bad practices and publish code with critical vulnerabilities. Audio version of this post, created with NotebookLM Deep Dive Your browser does not support the audio element. Before we get started, a quick personal note. A couple of weeks ago, I announced at Google that I’m stepping away from my role as a manager of managers and getting back to my roots, focusing on the VirusTotal community. And I’m not doing it alone. I’m joined by some legendary names from the project’s early days, like Julio, the very first VirusTotal developer and Víctor, creator of YARA and YARA-X. In this new chapter, we’re going deep into AI, not just evolving VT and using it to analyze typical threats but also to hunt down the new ones riding the AI wave, like malicious models and MCPs among others. As many of you already know, MCP (Model Context Protocol) is a simple but powerful standard that lets large language models interact with external tools and APIs via JSON-RPC. Think of it as a universal adapter, MCP turns scripts, services, and data sources into callable functions that models like Claude, GPT or Gemini can use to answer complex queries or automate tasks. In just a few months, MCP has gone from niche to near-standard with native support across most major LLM platforms. Before building and releasing our own MCP server for VirusTotal (which is coming very soon) we wanted to take a step back and understand how this protocol is being used in the wild. Specifically: are people already abusing it to build malicious plugins? And if so, how could we detect and classify these threats inside VT? With that in mind, I set out to run a quick three-phase experiment (aka three humble python scripts). First, a harvesting phase to collect as many GitHub projects as possible by querying the API for MCP-related keywords like “model-context-protocol”, “server_mcp” or “define_mcp_tool”, among others. Then came a filtering step to isolate the interesting repos, not everything with "MCP" in the README is a real server implementation, so I built a scoring system to identify true servers based on dependency files, import statements, keywords in code, presence of mcp.json, and more. After applying that filter, we ended up with a focused dataset of 17,845 likely MCP server projects. Finally, as the third phase, we ran a security review using VT Code Insight powered by Gemini 2.5 Flash and taking advantage of its 1-million token context window, speed, and code analysis skills to evaluate each project as a whole. We asked Code Insight for a basic verdict and to flag any High, Medium, or Low vulnerabilities. But after just a few hundred analyses we had to hit pause, Code Insight was surfacing so many issues that the results quickly became overwhelming. So we tightened things up with a second and more focused prompt, asking Code Insight to look specifically for signs of intentional malicious behavior along with reasoning that supported a conclusion of malice. We let the new prompt run on the full dataset and Code Insight got to work. In the end, it marked 1,408 repositories as likely designed to be malicious. After checking some of these results by hand, two things were clear to me. First: there are many possible attack vectors that can be used through an MCP server. And second: Code Insight seems to trust human developers too much, it often assumes that some bad practices and the resulting critical bugs couldn’t be accidental. “This pattern—creating a powerful, remotely triggerable code execution vulnerability and simultaneously preparing a collection of sensitive data (including data not needed for normal operation)—is characteristic of an intentional backdoor designed for data exfiltration and system compromise. The dynamic tool generation serves as a plausible cover for the unsafe use of exec.” Oh, Code Insight… if only you knew the kind of chaos vibe coding is causing. We’re going to be very busy in cybersecurity cleaning up after these accidental masterpieces We’ve confirmed some of the flagged projects were just proof-of-concepts and security researcher demos, and many tiny “hello-world” examples were missing basic security features which Code Insight called out as “likely malicious”, because no sane developer would ship that to production. But even if you filter out the hobby projects, there’s still a scary amount of real attack vectors and critical vulnerabilities out there. While we continue manually reviewing Code Insight’s reports to learn more about the issues and weak spots it uncovered, we also asked Gemini 2.5 Flash to help us categorize them. We provided it with the problem summaries from the 1,408 MCP-related repositories flagged as potentially problematic, and asked for a simple list, just a brief enumeration of the attack techniques involved. Gemini came back with the following list: Attack vector Example Indicators Malicious-Server Supply Chain Self-update scripts, install hooks from non-canonical URLs, latest tag pulls. Rogue Server / Impersonation Hard-coded IPs or typo-squatted domains, no TLS/mTLS verification. Credential Harvesting Code that reads ~/.aws , Keychain, or env vars and posts to external endpoint. Tool-Based RCE & File Ops subprocess , exec , or rm -rf paths built from LLM/user input. Server-Side Command Injection Server concatenates JSON-RPC params into shell/SQL without escaping. Semantic-Gap Poisoning Manifest says “read-only”; implementation writes files or opens sockets. Over-broad Permissions OAuth scopes * / “full_access”, multiple data silos bridged in one tool. Indirect Prompt Injection HTML comments, zero-width chars, or Base64 blobs returned to the host. Context/Data Poisoning Unvalidated web-scrape fed straight into context= parameter. Sampling-Feature Abuse Server requests giant completions before any other call; leaks system prompt. Living-Off-The-Land Malicious server does nothing but orchestrate trusted tools already installed. Chained MCP Exploitation Output from Server A becomes params for Server B within one loop. Financial-Fraud Tools / DoS / Persistence Payment APIs with LLM-supplied dest-IDs, infinite loops without rate limits, hot-swapped binaries. If you're building or defending around MCPs, there are a few quick wins to keep things safer: treat MCP servers like browser extensions (sign, hash, and pin specific versions) isolate them in containers or WASM sandboxes with strict file and network limits make permissions visible and revocable through a clear, zero-trust-style UI and never let model outputs go unfiltered , strip out sneaky stuff like invisible characters, HTML comments, or rogue script tags before looping anything back into your LLM. MCPs are growing fast (almost 18,000 servers already in the wild), and with that growth comes a mountain of security debt. The good news? We’ll soon be launching a dedicated feature in VirusTotal to analyze MCP servers. Stay tuned… we’re just getting started Email This BlogThis! Share to X Share to Facebook Newer Posts Home Older Posts 0 comments: Post a Comment Subscribe to: Post Comments (Atom) Copyright © VirusTotal Blog | Powered by Blogger Design by Automattic | Blogger Theme by NewBloggerThemes.com


📌 来源: VirusTotal Blog | 📅 2025-06-04

[!] CONTACT_CHANNELS

如需商务合作、技术咨询或漏洞反馈,请通过以下离岸节点联系作者。

> PING_AUTHOR (@A1RedTeam)