Skip to content

fix(security): Unauthenticated shell command injection in todo image processing#1

Open
sozercan wants to merge 1 commit into
mainfrom
orka/security/fnd-be61bc01aedd-6426b826f2a4
Open

fix(security): Unauthenticated shell command injection in todo image processing#1
sozercan wants to merge 1 commit into
mainfrom
orka/security/fnd-be61bc01aedd-6426b826f2a4

Conversation

@sozercan
Copy link
Copy Markdown
Owner

Security remediation for finding fnd_be61bc01aedd.

Summary:
POST /create accepts attacker-controlled markdown image content, extracts a URL with a broad regex, and concatenates it into child_process.exec('identify ' + url). Because the command is executed through the shell with no quoting or argument separation, shell metacharacters in the captured URL can trigger arbitrary command execution on the app host.

Root cause:
Untrusted request data is interpolated into a shell command string and executed via exec().

Remediation guidance:
Avoid the shell entirely: parse and validate the URL, then use execFile/spawn with a fixed argument vector or remove the external command dependency.

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