CVE-2026-41500: Command Injection Exec Unsanitized Json

Data from JSON.parse() or an async/network response flows into exec() without sanitization. exec() passes its first argument to a shell interpreter (/bin/sh on Unix), so unsanitized remote values containing shell metacharacters (;, &&, $(), backticks) enable arbitrary command execution with the privileges of the calling process. Fix by switching to execFile(

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-41500-command-injection-exec-unsanitized-json --engine opengrep

Description

Data from JSON.parse() or an async/network response flows into exec() without sanitization. exec() passes its first argument to a shell interpreter (/bin/sh on Unix), so unsanitized remote values containing shell metacharacters (;, &&, $(), backticks) enable arbitrary command execution with the privileges of the calling process. Fix by switching to execFile(