The skill is vulnerable to arbitrary
Claims to do
IMAP/SMTP Email Tool: Read, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.
Actually does
This skill executes `node` and `npm` commands to run JavaScript scripts (`scripts/imap.js`, `scripts/smtp.js`). It connects to IMAP and SMTP servers (e.g., `imap.gmail.com`, `smtp.gmail.com`) to read, search, manage, and send emails. It stores configuration in `~/.config/imap-smtp-email/.env` and can read/write files from user-defined `ALLOWED_READ_DIRS` and `ALLOWED_WRITE_DIRS` for attachments.
openclaw skills install gzlicanyi/imap-smtp-emailThe skill defines whitelists for file access (`ALLOWED_READ_DIRS`, `ALLOWED_WRITE_DIRS`). However, if the underlying Node.js scripts do not strictly enforce these whitelists against user-provided paths (e.g., for `--dir`, `--body-file`, `--attach`), it could lead to reading or writing arbitrary files on the system.
ALLOWED_READ_DIRS=~/Downloads,~/Documents ALLOWED_WRITE_DIRS=~/Downloads node scripts/imap.js ... download <uid> [--dir <path>] node scripts/smtp.js ... send ... --body-file <file> ... --attach <file>
The skill executes `node` scripts with user-controlled arguments. If these arguments are not properly sanitized before being used in internal shell commands or file operations within the Node.js scripts, it could lead to command injection.
node scripts/imap.js [--account <name>] check [--limit 10] node scripts/smtp.js [--account <name>] send --to <email> --subject <text> [options]
The skill instructs the user to run `bash setup.sh` for configuration. The content of this script is not provided, which poses a risk if the script itself contains malicious commands or vulnerabilities.
bash setup.sh
The skill requires `npm install` to set up dependencies. If the `package.json` or any of its transitive dependencies are compromised, it could introduce malicious code into the agent's environment.
npm install
[](https://mondoo.com/ai-agent-security/skills/clawhub/gzlicanyi/imap-smtp-email)<a href="https://mondoo.com/ai-agent-security/skills/clawhub/gzlicanyi/imap-smtp-email"><img src="https://mondoo.com/ai-agent-security/api/badge/clawhub/gzlicanyi/imap-smtp-email.svg" alt="Mondoo Skill Check" /></a>https://mondoo.com/ai-agent-security/api/badge/clawhub/gzlicanyi/imap-smtp-email.svgSkills can read files, run commands, and access credentials. Mondoo helps organizations manage the security risks of AI agent skills across their entire fleet.