Skip to content

fix: the handleinput function at shell-env in shell-env.cjs#3704

Open
orbisai0security wants to merge 1 commit into
chatboxai:mainfrom
orbisai0security:fix-shell-env-command-injection-v001
Open

fix: the handleinput function at shell-env in shell-env.cjs#3704
orbisai0security wants to merge 1 commit into
chatboxai:mainfrom
orbisai0security:fix-shell-env-command-injection-v001

Conversation

@orbisai0security

Copy link
Copy Markdown

Summary

Fix critical severity security issue in src/main/mcp/shell-env.cjs.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File src/main/mcp/shell-env.cjs:1780
CWE CWE-78

Description: The handleInput function at shell-env.cjs:1780 passes user-controlled input (parsed.options.input) directly to a spawned shell process without sanitization. Shell metacharacters such as semicolons, backticks, pipes, and dollar signs in the input string are interpreted by the shell, enabling injection of arbitrary OS commands. Because the Electron main process runs with full Node.js capabilities and inherits the user's OS privileges, successful exploitation results in complete host system compromise.

Changes

  • src/main/mcp/shell-env.cjs

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f8c6c62c-620c-4598-9fe4-350515d4de59

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant