claude-code
Audited by Socket on Mar 18, 2026
1 alert found:
AnomalyThis document describes a powerful hook system that permits execution of arbitrary shell commands and LLM prompts using input supplied via stdin and environment variables. The main security concern is that many examples show unvalidated interpolation of external input into shell commands and executing scripts from plugin-provided locations. Those patterns enable command injection, path traversal, credential or file exfiltration, and arbitrary code execution under the user's account if inputs or plugins are untrusted. While the provided material does not contain an explicit malicious payload, it exposes significant supply-chain and runtime risk when adopted without the recommended mitigations (whitelisting, path canonicalization, strict input validation, and vetting plugins). Review and hardening are required before using these hooks in sensitive environments.