Description

Socket’s Threat Research team has uncovered 60 malicious packages on the NPM index designed to collect sensitive host and network data, sending it to a Discord webhook controlled by a threat actor. These packages, uploaded since May 12 via three separate publisher accounts, execute a post-install script during npm install to harvest information such as hostname, internal IP, home directory, username, DNS servers, and working directory. They also include checks for cloud-based or analysis environments, likely to avoid detection. Although no second-stage payloads, privilege escalation, or persistence mechanisms were observed, the data exfiltrated could be used for targeted network attacks. At the time of reporting, the packages remained available with around 3,000 cumulative downloads but have since been removed from NPM. The attackers used deceptive naming strategies resembling trusted packages like flipper-plugins, react-xterm2, and hermes-inspector-msggen to trick developers, possibly aiming at CI/CD pipelines. In a separate discovery, Socket also found eight highly destructive packages on NPM mimicking popular tools through typosquatting. These packages, live for nearly two years with over 6,200 downloads, contained date-triggered scripts to delete files, corrupt JavaScript methods, and sabotage web storage, especially targeting Vue.js, React, Node.js, and Quill. These threats highlight the importance of regular audits and caution when selecting packages. Developers are urged to immediately uninstall any listed malicious packages and perform full system scans. Despite the expiration of hardcoded payload dates, the threat remains if updates are pushed by the original author.