Fake npm Packages Found in GitHub Repository

Security researchers discovered four vulnerable npm packages uploaded to GitHub that were capable of collecting the user’s IP address, geolocation and device hardware data.

Not all attacks have a high-visibility profile. Some threat actors use much more subtle channels to spread malware. In this case, it’s about four npm packages typically used by developers to manage packages that are dependencies for various projects.

The four packages discovered by Sonatype had similar names to the original ones, with the attacker using a technique named typosquatting. Basically, if the user didn’t pay enough attention and typed the wrong letter, he would download the fake package.

“The two packages representing next-generation software supply chain attacks rely on typosquatting – an attack that impersonates legitimate packages and makes them available for unsuspecting developers to download,” says Sonatype. “For example, the developer requests the ‘electron’ package but unintentionally spells it ‘electorn’.”

This is also called a supply chain attack because threat actors trick users into downloading the wrong app or package from a legitimate source. In this case, `electorn`, `loadyaml`, `lodashs`, and `loadyml` are the packages in question. They gathered only about 400 downloads, but that’s only because someone happened to look in that direction.

Supply chain attacks are a big problem and, as projects become more complex, with multiple dependencies, security systems have to keep up. A piece of malware capable of sharing the geolocation of users is dangerous enough but, depending on the project, it can do much more damage.

Since Github was quick to remove the packages, the campaign was short-lived and its end goal remains a mystery. It’s possible that the attacker was collecting data to determine the course of action. But it’s also possible that such specific libraries could have impacted critical projects using them.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top