Dependency Confusion Vulnerability in Sifnode Due to Unclaimed npm Packages.
The sifnode project used npm packages that were not claimed on the public registry, allowing an attacker to publish packages with the same names. An attacker could then distribute malicious code to anyone installing the project, leading to remote code execution.
Originally disclosed on HackerOne
- Disclosed after 7 months
Summary:
Hello, I've found a Dependency Confusion vulnerability in the sifnode project. The vulnerability allows me to claim previously unclaimed npm packages that are being used by the sifnode project, and serve malicious content in them which would allow me to gain remote code execution on anyone who installs the project.
Steps To Reproduce:
- Create an account on npmjs.org and publish two malicious packages with names
sifchain-monorepoandtestnet-contracts. - Wait and watch as your malware is unknowingly distributed among thousands of users.
Supporting Material/References:
I claimed the package sifchain-monorepo a day ago and since then it has been downloaded over 300 times.

Note that I did not make the package malicious as the scope only specified testing to be done in the source code, and putting malware inside the package would have affected hundreds of users, and I did not have the authorization to do so.
I have claimed the package testnet-contracts an hour ago too, but since it hasn't been over a day, I am not able to view the statistics.

Mitigation
Once you have reviewed this report, I can unclaim the two packages and you can upload your own ones there. You can also ask developers to configure their machines such that it requests internal packages from internal or cloud based servers, instead of from npmjs.org which might contain malicious ones.
References
These are two excellent blog posts explaining the issue in detail: https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610 https://incolumitas.com/2016/06/08/typosquatting-package-managers/
Impact
Remote Code Execution on potentially thousands of users - including developers inside the organization.
Regards,
- quas4r
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the project referenced internal npm packages by name without claiming them on the public registry, allowing an attacker to register those names and serve malicious code.
Impact
Remote code execution on potentially thousands of users, including developers inside the organization.
What the attacker needed
Npm account; knowledge of unclaimed package names
The fix
The reporter offered to unclaim the packages so the project could claim them, and suggested configuring developers to fetch internal packages from internal or cloud servers.
How it was found
- Create an account on npmjs.org and publish two malicious packages with names `sifchain-monorepo` and `testnet-contracts`.
- Wait and watch as your malware is unknowingly distributed among thousands of users.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a project uses a package from a public registry like npm, it relies on the package name. If the project uses a package name that is not yet taken on the public registry, an attacker can register that name and upload their own malicious version. Then, when someone installs the project, they unknowingly download and run the attacker's code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.