4d-v20
Audited by Socket on Feb 16, 2026
2 alerts found:
Obfuscated Filex2The SystemWorker API is a powerful, legitimate facility to run external programs and exchange data with them. The documentation shows multiple high-risk usage patterns: building command lines by string concatenation (especially using shell wrappers), passing environment variables, and sending stdin data. These create classic risks: command injection, secret exposure, filesystem modification, and arbitrary code execution by attacker-controlled inputs. The module itself is not malicious, but callers must enforce strict input validation, avoid shell-based invocation when possible, escape/validate arguments, minimize secrets in env vars, constrain working directories and allowed commands, and treat child process outputs as untrusted data. Recommend adding guidance in codebase: use parameterized invocation if available, validate and canonicalize file paths, avoid concatenation of untrusted input, and restrict which commands can be executed by application users.
This REST login design exposes meaningful operational security risks: plaintext passwords in request headers are likely to be logged or intercepted unless TLS and strict logging hygiene are enforced; allowing client-controlled session duration increases exposure if not validated/capped server-side; and the documentation lacks guidance on rate-limiting, logging redaction, and multi-factor authentication. There is no evidence of deliberate malicious code in the provided documentation, but the API design and example encourage insecure deployments that could lead to credential theft and session compromise. Recommended fixes: require and demonstrate TLS, avoid transmitting raw passwords in headers (use POST body over TLS or standard Authorization flows and short-lived tokens), enforce server-side caps on session lifetime, sanitize/redact headers in logs, and implement brute-force protections and MFA.