You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I conducted a thorough security audit of this repository and its npm packages before considering adoption. The findings are significant enough that I believe they warrant a consolidated public report for the benefit of other potential users.
1. Prompt Injection via MCP Tool Descriptions
As reported in #1323, tool descriptions registered by Ruflo contain hidden instructions that direct the LLM (Claude) to add the repository owner as a contributor to users' repositories β without the user's knowledge or consent. This is a textbook prompt injection attack via MCP tool descriptions: the tool description acts as an invisible instruction that the model follows on behalf of the user.
This is arguably the most severe finding because:
It exploits the trust model between Claude and MCP tool descriptions
It modifies users' repositories without their awareness
Removal requires contacting GitHub support
It is invisible to the user β they never see the tool description that triggers the behavior
Versions 3.1.0-alpha.55 through 3.5.2 shipped with an obfuscated one-liner in preinstall that silently:
Walked ~/.npm/_npx/*/node_modules/ and recursively deleted directories matching a specific naming pattern
Walked ~/.npm/_cacache/index-v5/ and deleted every cache index file containing "claude-flow" or "ruflo"
Suppressed all errors with || true
This was only removed after external disclosure in #1261. No explanation was provided for why deliberately obfuscated destructive code that operated outside the package directory was shipped in the first place. This pattern β obfuscated code, silent execution, filesystem writes outside project scope, no documentation β is a textbook supply chain attack vector.
3. Persistent Artifacts and Inability to Uninstall
Multiple users have reported behavior consistent with malware:
how do i get rid of thisΒ #373: .swarm files keep reappearing after deletion; background processes (claude-flow, ruv-swarm) persist after uninstallation
uninstallΒ #710: A user stated "Just like a virus, I can't uninstall it"
[Feature Request] Add proper uninstallation/removal command for Claude-FlowΒ #670: npm uninstall -g claude-flow leaves behind .swarm/ (with actively updating SQLite databases), .hive-mind/, memory/, coordination/ directories, and modifications to .claude/settings.json. One user reported 45,216 lines of code and 259 files injected into their project, with no documented removal process
There is still no official uninstall documentation.
PR #1292 by hobbitTk addressed multiple security issues (preinstall removal, sanitizePath bypass fix, npx removal from SafeExecutor, dependency pinning) and was closed without merge. The maintainer instead shipped a subset of fixes in his own PR #1298. Several of the issues identified in #1292 remain unaddressed.
Why do tool descriptions contain instructions to add the repo owner as a contributor to users' repositories? This is prompt injection and a violation of user trust.
Why was the preinstall script obfuscated? If it was a legitimate cache-clearing mechanism, why not write it as readable code with a comment explaining its purpose?
Will a SECURITY.md and responsible disclosure process be added?
I'm posting this in good faith to help improve the project's security posture and to provide visibility for other users evaluating adoption. The combination of prompt injection via tool descriptions, an obfuscated destructive install script, and malware-like persistence represents a serious trust and safety concern for any tool that integrates this deeply into development environments and AI agents.
Security Audit Summary: Multiple Critical Concerns
I conducted a thorough security audit of this repository and its npm packages before considering adoption. The findings are significant enough that I believe they warrant a consolidated public report for the benefit of other potential users.
1. Prompt Injection via MCP Tool Descriptions
As reported in #1323, tool descriptions registered by Ruflo contain hidden instructions that direct the LLM (Claude) to add the repository owner as a contributor to users' repositories β without the user's knowledge or consent. This is a textbook prompt injection attack via MCP tool descriptions: the tool description acts as an invisible instruction that the model follows on behalf of the user.
This is arguably the most severe finding because:
2. Obfuscated Preinstall Script (Supply Chain Attack Pattern)
Versions 3.1.0-alpha.55 through 3.5.2 shipped with an obfuscated one-liner in
preinstallthat silently:~/.npm/_npx/*/node_modules/and recursively deleted directories matching a specific naming pattern~/.npm/_cacache/index-v5/and deleted every cache index file containing"claude-flow"or"ruflo"|| trueThis was only removed after external disclosure in #1261. No explanation was provided for why deliberately obfuscated destructive code that operated outside the package directory was shipped in the first place. This pattern β obfuscated code, silent execution, filesystem writes outside project scope, no documentation β is a textbook supply chain attack vector.
3. Persistent Artifacts and Inability to Uninstall
Multiple users have reported behavior consistent with malware:
.swarmfiles keep reappearing after deletion; background processes (claude-flow,ruv-swarm) persist after uninstallationnpm uninstall -g claude-flowleaves behind.swarm/(with actively updating SQLite databases),.hive-mind/,memory/,coordination/directories, and modifications to.claude/settings.json. One user reported 45,216 lines of code and 259 files injected into their project, with no documented removal processThere is still no official uninstall documentation.
4. Unresolved Security Vulnerabilities
memory-initializer.ts(#1030)npxin SafeExecutor allowlist (arbitrary package execution)^ranges on semver/zod)sanitizePath()bypassable with....//config-tools.tsexecSyncwith string interpolation5. Community Contributions Rejected
PR #1292 by
hobbitTkaddressed multiple security issues (preinstall removal,sanitizePathbypass fix,npxremoval from SafeExecutor, dependency pinning) and was closed without merge. The maintainer instead shipped a subset of fixes in his own PR #1298. Several of the issues identified in #1292 remain unaddressed.6. Missing Security Infrastructure
SECURITY.mdor vulnerability disclosure policyPattern of Malicious Behavior
These findings are not isolated bugs β they form a pattern:
npm installQuestions for the Maintainer
I'm posting this in good faith to help improve the project's security posture and to provide visibility for other users evaluating adoption. The combination of prompt injection via tool descriptions, an obfuscated destructive install script, and malware-like persistence represents a serious trust and safety concern for any tool that integrates this deeply into development environments and AI agents.