Back to Feed

The Threat of Malicious Open Source Software Packages

Amit Bismut

-

March 20, 2024

In the fast-paced world of software development, malicious packages stand out as a significant threat, capable of compromising security and integrity. Bad actors cleverly disguise harmful packages as helpful tools, targeting unsuspecting developers and organizations. In this blog, we will discuss their frequency, impacts, and what should be done if a malicious package is found.

Malicious vs. Vulnerable

Malicious packages carry code with harmful intentions, like infecting the host running them with malware. This is different from vulnerable packages, which contain unintentional security bugs that may allow attacks when the application is running and has network access. Malicious packages aim to attack the application's host, regardless of whether it's running in a production environment.

How frequent are malicious packages?

According to the information provided in the Security Advisory released by GitHub, an alarming average of 11 malicious NPM packages are being reported on a weekly basis since the beginning of the year 2024. This consistent and significant number of malicious packages highlights that this type of risk is not only increasingly common but also occurs with a high frequency, making it a critical concern.

A notable example from the last days involves North Korean hackers targeting developers with malicious npm packages. One such package, execution-time-async, poses as its legitimate counterpart execution-time. The legitimate library, which has more than 27,000 weekly downloads, is a Node.js utility used for measuring code execution time.

Potential impact

Malicious open-source software packages can cause severe harm, and the severity of their impact can vary significantly, depending on the nature of the malicious code and the system where the package is installed.

  1. Data Breach: harvest sensitive data, leading to serious breaches. Personal details, financial information, and proprietary business data can be stolen and exploited.
  2. System Compromise: Malicious packages may compromise system security, permitting unauthorized access and command execution.
  3. Propagation of Malware: Malicious packages can serve to deliver malware, spreading it further or turning the host into a botnet part.
  4. Reputation Damage: The discovery of a malicious package can significantly harm the reputation of the organizations using it.

What to Do If You Find a Malicious Package

If a malicious package is detected, immediate action is necessary to remove it from the system and replace it with a secure alternative.Treat this as a security incident: involve security teams to isolate infected hosts and halt the spread of malicious code. Additionally, it's crucial to report the package to the relevant OSS community or security organization to protect others from the same threat.

Backslash can help

Backslash products scan code efficiently and detect malicious packages, whether they're added directly or in a transitive manner into a project or application. See it in action and experience its capabilities first hand

Conclusion

The journey through the complexities of software security underscores the importance of being ever-vigilant. While the challenge is significant, it is not insurmountable. With the right knowledge and tools, such as Backslash, we can protect our projects and organizations from harm. Let this be a call to action: to arm ourselves with the best defenses, remain vigilant, and foster a culture of security that can withstand the threats.