• News/
  • https://www.bleepingcomputer.com/news/security/new-npm-attack-poisons-local-packages-with-backdoors/

New npm attack poisons local packages with backdoors

BleepingComputer
·
Bill Toulas
·
Published Mar 26, 2025
·
Updated

Two malicious packages were discovered on npm (Node package manager) that covertly patch legitimate, locally installed packages to inject a persistent reverse shell backdoor. This way, even if the victim removes the malicious packages, the backdoor remains on their system. The new tactic was discovered by researchers at Reversing Labs, who warned about the risk it entails, even if the packages weren't downloaded in large numbers. "It's not unusual to encounter downloaders on npm; they are maybe not as common as infostealers, but they are far from uncommon," explains Reversing Labs. "However, this downloader is worth discussing because of the exceptional strategies employed by the attackers to hide the malicious payload it delivered." The two packages discovered by Reversing Labs during routine security investigations on the open-source supply chain are 'ethers-provider2' and 'ethers-providerz.' The first package, which is still available on npm at the time of writing, is based on the popular 'ssh2' npm package but with a modified 'install.js' script that downloads a second-stage payload from an external source, which is executed and then deleted when finished to wipe all traces. The second stage monitors for the legitimate 'ethers' package, and once it finds it, it replaces the legitimate 'provider-jsonrpc.js' file with a trojanized version. The injected file now fetches a third-stage payload from the remote host, which enables a reverse shell using a modified SSH client, mi...

Read full article

Affected Software

4 affected components
ethersproject providers
theoretical123 providers
npm ethers-provider2
npm ethers-providerz

Frequently Asked Questions

1

What is the main topic of this article?

The article discusses a new attack on npm that introduces malicious packages injecting backdoors into locally installed software.

2

What security implications are discussed in the article?

The article highlights that the attack enables persistent reverse shells, allowing attackers to maintain access even after the malicious packages are deleted.

3

What products or software are affected by this npm attack?

The affected software includes legitimate packages patched to include backdoors, specifically targeting the 'ethersproject providers' and 'npm ethers-provider' packages.

4

How do attackers use the malicious packages in this npm attack?

Attackers use the malicious packages to silently modify existing local packages, inserting code for unauthorized access.

5

What should developers do to protect against this type of npm attack?

Developers should regularly audit their dependencies and use package integrity checks to detect unauthorized changes to their local packages.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203