Python Package ‘solana-token’ Stole Dev Secrets

Python Package ‘solana-token’ Stole Dev Secrets Python Package ‘solana-token’ Stole Dev Secrets
IMAGE CREDITS: DECRYPT

Cybersecurity researchers have uncovered a malicious Python package on PyPI, the official Python Package Index, that posed as a Solana blockchain-related tool but was in fact designed to steal source code and sensitive developer secrets. The package, named solana-token, was taken down after being downloaded 761 times, though not before potentially compromising multiple developer systems.

According to ReversingLabs researcher Karlo Zanki, the package was uploaded in early April 2024 and disguised its activity through a misleading versioning scheme.

How the Malicious Package Worked

Once installed, solana-token executed a function deceptively named register_node(), which acted as a front for its malicious payload. Behind the scenes, the function scanned the local Python execution stack, searching through code files and directories for developer secrets and proprietary source code, which it then exfiltrated to a hardcoded IP address.

This behavior strongly suggests that the attackers were targeting developers working on blockchain or crypto infrastructure, particularly those who might accidentally hard-code sensitive information—like API keys or wallet credentials—early in their development process.

Likely Distribution Strategy and Target Audience

The exact method of promoting or distributing the package remains unclear. However, researchers suspect it may have been promoted via developer forums or code-sharing platforms, where blockchain developers often look for tools and code snippets.

Given its name and functionality, the malicious package appears to have been aimed at developers experimenting with building on the Solana blockchain or creating Solana-related tools.

A Growing Supply Chain Threat in Crypto-Focused Development

This incident highlights once again how supply chain attacks in open source repositories—especially those related to crypto—are increasingly common and highly targeted. With developers frequently pulling packages from PyPI and other repositories to speed up development, malicious actors are exploiting this trust to inject backdoors directly into development environments.

Zanki warned that “development teams need to aggressively monitor for suspicious activity or unexplained behavior in both open source and commercial packages.” Preventing such attacks requires early detection of unusual behavior and strict scrutiny of packages—particularly those without a clear maintainer history or suspicious metadata.

Best Practices for Developers

To minimize risk, developers should:

  • Avoid installing Python packages from unknown or unverified authors.
  • Inspect package source code—especially unfamiliar functions like register_node()—before use.
  • Use sandbox environments when testing third-party tools.
  • Set up network monitoring to detect unexpected outbound connections.
  • Regularly audit dependencies and pin known-good versions.

As the popularity of blockchain development grows, so too will the risk of targeted supply chain attacks. This latest case from PyPI serves as yet another reminder: even well-known repositories are not immune to threat actors, and due diligence is a developer’s first line of defense.

Share with others

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Service

Follow us