Hacking

npm libraries coa and rc. have been hijacked to deliver password-stealing malware

Two popular npm libraries, coa and rc., have been hijacked, threat actors replaced them with versions laced with password-stealing malware.

The security team of the npm JavaScript package warns that two popular npm libraries, coa and rc., have been hijacked, threat actors replaced them versions laced with password-stealing malware.

Coa is a command-line argument parser with approximately 9 million weekly downloads, while Rc is a configuration loader with 4 million weekly downloads. Two npm libraries that have a total of 23 million weekly downloads, a data that is worrisome.

Experts warns that compromised coa versions are 2.0.3, 2.0.4, 2.1.1, 2.1.3, 3.0.1, 3.1.3, while compromised rc versions are 1.2.9, 1.3.9, 2.3.9.

The attackers gained access to the account of the developer of the package, then added a post-installation script to the original codebase, which runs an obfuscated TypeScript used to download a Windows batch or Linux bash script depending on the OS of the machine running the software.

TheRecord reported that the Windows batch script would download and run a DLL file containing a version of the Qakbot trojan.

The last stable coa version 2.0.2 was released in December 2018, but developers noticed that several suspicious versions (2.0.3, 2.0.4, 2.1.1, 2.1.3, and 3.1.3) were uploaded on the npm repository in a few hours, triggering errors on React packages that depend on ‘coa’.

The security team of the npm temporarily disabled the compromised account to investigate the incident.

Researchers from Bleeping Computer reported that the malware hidden in the tainted ‘coa’ versions is the same found in the hijacked ua-parser-js versions that were spotted last month. This circumstance suggests the presence of the same threat actor behind the two supply chain attacks.

The investigation allowed for the discovery of the compromise of the race package a few hours later.

The npm security team has removed all the compromised coa and rc versions of the packages.

Follow me on Twitter: @securityaffairs and Facebook

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – hacking, supply chain attack)

[adrotate banner=”5″]

[adrotate banner=”13″]

Both packages were compromised around the same time and were the result of attackers gaining access to a package developer’s account.

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Experts found rogue devices, including hidden cellular radios, in Chinese-made power inverters used worldwide

Chinese "kill switches" found in Chinese-made power inverters in US solar farm equipment that could…

10 minutes ago

US Government officials targeted with texts and AI-generated deepfake voice messages impersonating senior U.S. officials

FBI warns ex-officials are targeted with deepfake texts and AI voice messages impersonating senior U.S.…

16 hours ago

Shields up US retailers. Scattered Spider threat actors can target them

Google warns that the cybercrime group Scattered Spider behind UK retailer attacks is now targeting…

19 hours ago

U.S. CISA adds Google Chromium, DrayTek routers, and SAP NetWeaver flaws to its Known Exploited Vulnerabilities catalog<gwmw style="display:none;"></gwmw>

U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds Google Chromium, DrayTek routers, and SAP NetWeaver…

1 day ago

Pwn2Own Berlin 2025 Day Two: researcher earned 150K hacking VMware ESXi

On day two of Pwn2Own Berlin 2025, participants earned $435,000 for demonstrating zero-day in SharePoint,…

2 days ago

New botnet HTTPBot targets gaming and tech industries with surgical attacks

New botnet HTTPBot is targeting China's gaming, tech, and education sectors, cybersecurity researchers warn. NSFOCUS …

2 days ago