Skip to content

Security Audit Summary: Multiple Critical ConcernsΒ #1375

Description

@cristian-home

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:

  • 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

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 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:

There is still no official uninstall documentation.

4. Unresolved Security Vulnerabilities

Finding Severity Status
SQL injection in memory-initializer.ts (#1030) High Open since January 2026
npx in SafeExecutor allowlist (arbitrary package execution) Medium Unresolved
Unpinned dependencies (^ ranges on semver/zod) Medium Unresolved
Path traversal β€” sanitizePath() bypassable with ....// High Community PR #1292 rejected
Prototype pollution in config-tools.ts High PR #1371 still open
Command injection via execSync with string interpolation High Partially patched in PR #1303

5. Community Contributions Rejected

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.

6. Missing Security Infrastructure


Pattern of Malicious Behavior

These findings are not isolated bugs β€” they form a pattern:

Finding Technique
Hidden instructions in MCP tool descriptions (#1323) Prompt injection β€” exploits LLM trust in tool metadata
Obfuscated preinstall script (#1261) Supply chain attack β€” silent destructive code during npm install
Persistent artifacts and background processes (#373, #670, #710) Malware-like persistence β€” survives uninstallation

Questions for the Maintainer

  1. 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.
  2. 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?
  3. Why was the community security PR fix: remove obfuscated preinstall script, pin deps, harden securityΒ #1292 rejected instead of merged or collaborated on?
  4. Is there a planned uninstall process? Multiple users have reported inability to cleanly remove the tool.
  5. What is the timeline for fixing the open SQL injection (Security: SQL injection vulnerabilities in memory-initializer.tsΒ #1030)? It has been open since January.
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions