cloudflare
Audited by Socket on Sep 4, 2026
2 alerts found:
Anomalyx2This fragment shows generally standard serverless patterns (middleware, auth via KV sessions, rate limiting, redirects, caching, and upload). However, it includes a high-suspicion behavior: an outbound POST to an external webhook domain executed in ctx.waitUntil (background task after response). That pattern can be used for covert tracking or data exfiltration. Additional security issues include permissive wildcard CORS, direct use of client-controlled file.name as an object key, potential error-message leakage, and underspecified caching that may cause unintended content reuse. Overall, no clear backdoor or eval-style malware is present, but the webhook egress is the strongest red flag.
No clear evidence of explicit malicious code (e.g., backdoor, command execution, or hidden payload). However, the module has notable supply-chain/privacy risk: it logs email text (sensitive data) and POSTs inbound email metadata (from/subject) to an externally configured webhook (env.WEBHOOK_URL). If the webhook destination is compromised or misconfigured, this becomes an effective data-exfiltration channel. There is also an apparent scoping inconsistency for the `email` variable in the archival/extraction portion, which could cause runtime failures or unintended behavior in the full module.