| Version | Supported |
|---|---|
| 1.0.x | ✅ Yes |
If you discover a security vulnerability, please do not open a public issue. Instead, send an email to the maintainer or use a private vulnerability disclosure channel.
- Email: security@involvex.dev
- Private Advisory: Use GitHub's private vulnerability reporting feature
Please include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if known)
- Initial Response: Within 48 hours
- Detailed Assessment: Within 7 days
- Fix Release: Within 14 days (for critical vulnerabilities)
This CLI may store API keys for AI providers. Follow these best practices:
- Never commit API keys to version control
- Use environment variables when possible
- Rotate keys regularly
- Use separate keys for development and production
# Example: Set API keys via environment
export OPENROUTER_API_KEY=your_key_here
export OPENAI_API_KEY=your_key_here
export GEMINI_API_KEY=your_key_hereThe WhatsApp session is stored locally in .wwebjs_auth_session/:
- Contains: Authentication tokens for WhatsApp Web
- Protection: Add to
.gitignore - Cleanup: Delete directory when logging out
# Add to .gitignore
.wwebjs_auth_session/
.whatsapp-cli-config.json
.env
*.localThis application uses Puppeteer to control Chrome:
- Headless Mode: Chrome runs without visible UI
- Sandbox Disabled: Required for some environments
- Executable Path: Configured via environment variable
const puppeteerOptions: LaunchOptions = {
headless: true,
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-gpu',
'--disable-web-security', // ⚠️ Required for WhatsApp Web
'--disable-features=VizDisplayCompositor',
],
}- Rate Limiting: WhatsApp may block accounts that send messages too quickly
- Account Safety: Use a dedicated test account for development
- Message Content: Be careful with automated message content
- HTTPS Only: All AI provider APIs should use HTTPS
- Proxy Support: Configure proxies if required by your environment
- Firewall Rules: Ensure outbound connections to:
web.whatsapp.com(WhatsApp Web)- AI provider endpoints
The optional web UI (--web / --no-tui) is served over plain HTTP on 127.0.0.1 by default. It is not intended to be exposed to the public internet.
- The web server binds to
127.0.0.1by default (loopback only). - Binding to any non-loopback address prints a warning to stderr: anyone who can reach the port can read your WhatsApp messages.
- Use
--host 127.0.0.1(default) unless you have a specific reason and understand the risk.
- Every web UI URL contains a single-use pairing token:
http://127.0.0.1:3178/?token=<token>. - The token is required on every
/api/*request (via?token=query param for SSE,x-auth-tokenheader for mutations). - Treat the URL as a secret: anyone with the token can read your messages and send on your behalf.
- The token is randomly generated per server run (24 bytes, base64url) and is not persisted across restarts.
apiKeyvalues are redacted from config responses (hasApiKeyboolean only) and are write-only via the API.
- Host/Origin validation: Non-GET requests are rejected unless the
Originheader matches the server's own URL. GET requests are rejected unless theHostheader is a loopback address or matches the bound host. This mitigates DNS rebinding and cross-origin request forgery. - Media path traversal: File downloads (
/api/downloads) resolve the requested name inside the downloads directory only; traversal sequences (..) are rejected. - Request size limit: Upload bodies are capped (≈200 MB for media) to prevent abuse.
- Cross-site scripting (XSS): QR codes and messages are rendered server-side / as plain text. User-controlled message content is not inserted into HTML except via
dangerouslySetInnerHTMLfor the server-generated QR SVG. - Session data: WhatsApp authentication tokens live in
.wwebjs_auth_session/— see Session Data above.
- Remote code execution
- Authentication bypass
- Session hijacking
- Data exposure of sensitive messages
- API key leakage
- Unauthorized access to session data
- Cross-site scripting (if web features added)
- Denial of service
- Information disclosure
- Rate limiting bypass
- Minor configuration issues
- UI inconsistencies
# Check for vulnerable dependencies
bun audit
npm audit
# Update dependencies regularly
bun update- All code changes should be reviewed
- Use TypeScript for type safety
- Enable ESLint with security rules
- Run tests before deployment
- Reporter submits vulnerability
- Maintainer confirms and assesses severity
- Maintainer develops fix
- Fix is released
- Advisory is published (with credit)
Security researchers who report vulnerabilities will be credited in the release notes (if desired).
This security policy is part of the WhatsApp CLI project and follows the same MIT license.
For security-related questions not involving vulnerability disclosure, please open a GitHub Discussion with the security tag.