Skip to content

fix: sanitize shell/subprocess call in extractSlotComponents.js - #1229

Open
anupamme wants to merge 1 commit into
PrismarineJS:masterfrom
anupamme:fix-repo-minecraft-data-command-injection-extract-slot-components
Open

fix: sanitize shell/subprocess call in extractSlotComponents.js#1229
anupamme wants to merge 1 commit into
PrismarineJS:masterfrom
anupamme:fix-repo-minecraft-data-command-injection-extract-slot-components

Conversation

@anupamme

Copy link
Copy Markdown
Contributor

Summary

Fix high severity security issue in tools/js/extractSlotComponents.js.

Vulnerability

Field Value
ID V-002
Severity HIGH
Scanner multi_agent_ai
Rule V-002
File tools/js/extractSlotComponents.js:3
Assessment Likely exploitable
CWE CWE-78

Description: The version argument is used without validation in a shell command string passed to cp.execSync() for git clone, enabling command injection via shell metacharacters.

Evidence

Exploitation scenario: Execute: node tools/js/extractSlotComponents.js '1.21; rm -rf ~'.

Scanner confirmation: multi_agent_ai rule V-002 flagged this pattern.

Changes

  • tools/js/extractSlotComponents.js

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
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