CVE-2021-4435: Child Process Unvalidated Wrapper

A wrapper function exposing child_process methods directly passes an unqualified command parameter without apparent path validation. If the executing environment runs in an untrusted directory, this can trigger an Untrusted Search Path vulnerability (CWE-426), where a local executable is hijacked. Ensure that commands are validated (e.g., checking for path t

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2021-4435-child-process-unvalidated-wrapper --engine opengrep

Description

A wrapper function exposing child_process methods directly passes an unqualified command parameter without apparent path validation. If the executing environment runs in an untrusted directory, this can trigger an Untrusted Search Path vulnerability (CWE-426), where a local executable is hijacked. Ensure that commands are validated (e.g., checking for path t