Skip to content

Security

  • Argon2id password hashing; JWT with issuer (leviro-relay) and HS256-only validation; session revocation via a version counter.
  • CSRF protection on browser endpoints (the /api/v1/* surface uses X-API-Key instead, by design).
  • Socket.IO authentication — the handshake is authenticated and the origin is enforced, because the wa:qr event can pair a device.
  • API keys are stored as SHA-256 hashes, with expiry, total budgets, per-minute limits, and IP allowlists.
  • AES-256-GCM credential encryption for the WhatsApp session, Telegram bot token, backup credentials, and webhook secrets. Rotating or losing the WhatsApp encryption key forces re-pairing; back it up separately from the database.
  • Webhook SSRF protection: scheme checks, DNS resolution with private/loopback/link-local rejection, redirects never followed, 10-second timeout.
  • Upload validation against the file’s actual leading bytes, not the type the client declared.
  • Signal key material redaction in logs and responses; error text is redacted in production.
  • Generate fresh, independent secrets; never commit .env or API keys.
  • Put production deployments behind HTTPS; never publish MongoDB or Redis ports.
  • Keep MongoDB, Redis, Node.js, and the host system updated.
  • Store backup archives encrypted at rest and access-controlled (see Backups & recovery). Archives are unencrypted .tar.gz bearer bundles — anyone holding an archive and the encryption secret holds the accounts.
  • Back up WA_SESSION_ENCRYPTION_KEY separately from the database.
  • Only message recipients who have consented; follow the law and the platforms’ terms.

Compose publishes the application port on 127.0.0.1 only by default (APP_BIND_ADDRESS, falling back to HOST); MongoDB and Redis publish no ports at all. CORS and the Socket.IO origin allowlist are APP_BASE_URL plus one optional EXTRA_ALLOWED_ORIGIN, both bare origins.

Four WhatsApp invite codes existed in a historical channels.json in the repository (no tokens). The recommendation is to reset/regenerate those links rather than rewrite git history; the owner decision is still pending.

See Security policy. Do not post sensitive vulnerability details publicly before responsible disclosure.