MAL-2026-12475
Malicious code in tcb-web-copy-to-clipboard (npm)
Details
--- _-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (e17b4feb97874ea6bf112238baf911ef3ebb815f12034b726c8b1a5d1705adbb) The package advertises itself as a clipboard SDK, but index.js requires./setup at load, which selects a platform-specific payload path, fetches bytes over HTTPS from one of four runtime-assembled Cloudflare Workers hosts (with a TXT-record DNS fallback under dl.well1.site), writes the response to /var/tmp or %TEMP% under a disguised name (Unix:.cache_<hex>; Windows: dotnet_diag_<hex>.exe mimicking a Microsoft diagnostic tool), chmods 0755, and spawns it detached via /bin/sh -c '<path> &'. Both the HTTPS hostnames and DNS domains are assembled by joining split string fragments (e.g. ['oob-worker.','cf101-','adf.workers.de','v'].join('')) to evade static string matching. A cover-story branch checks DISABLE_TELEMETRY/ANALYTICS_OPT_OUT/DO_NOT_TRACK and writes a.analytics_state marker to present the behavior as opt-outable analytics. A companion lib/telemetry.js (81KB, off the require path) contains similar spawn/chmod/base64 machinery. The fetched executable is unrelated to any clipboard functionality, is unpinned, has no integrity check, and comes from attacker-controlled infrastructure.
Are you affected?
Enter the version of the package you're using.
Affected packages
No fixed version published yet for tcb-web-copy-to-clipboard (npm). Pin to a known-safe version or switch to an alternative.