Python Developer's Nightmare: Malicious Library Infects Wallets

Friday 4th of April 2025 16:20:26

Bitcoin Python Library Used to Spread Malware, Warns Security Firm

A popular open-source Python library used for interacting with the Bitcoin blockchain has been compromised and is now being used to spread malware, according to security firm, Snyk.

The library, called "bit" and maintained by a community of developers, is designed to make it easy for developers to integrate Bitcoin functionality into their applications. However, Snyk's researchers have discovered that the library has been tampered with, allowing attackers to inject malicious code into projects that use it.

The malware, which Snyk has dubbed "BitStealer," is designed to steal sensitive information from infected systems, including Bitcoin wallets and API keys. It can also be used to launch further attacks, such as DDoS attacks or the theft of sensitive data.

Snyk's researchers believe that the malware was first introduced to the library around June 2021, and that it has likely been spreading undetected for several months. The firm has warned that any projects that use the compromised library are at risk of being infected, and that developers should take immediate action to update their dependencies and scan their code for malware.

The discovery highlights the importance of securing open-source libraries, which are often relied upon by developers to speed up their development process. It also underscores the need for developers to regularly scan their code for malware and to stay up-to-date with the latest security patches.

Snyk has released a patch to fix the vulnerability, and has advised developers to upgrade to the latest version of the library as soon as possible. The firm has also offered to help developers affected by the malware to clean up their code and prevent further infections.