Rogue PyPI Library Solana Users, Steals Blockchain Wallet Keys

Share:

Cybersecurity researchers have discovered a new malicious package on the Python Package Index (PyPI) repository that masquerades as a library from the Solana blockchain platform but is actually designed to steal victims’ secrets.

“The legitimate Solana Python API project is known as ‘solana-py’ on GitHub, but simply ‘solana’ on the Python software registry, PyPI,” Sonatype researcher Ax Sharma said in a report published last week. “This slight naming discrepancy has been leveraged by a threat actor who published a ‘solana-py’ project on PyPI.”

The malicious “solana-py” package attracted a total of 1,122 downloads since it was published on August 4, 2024. It’s no longer available for download from PyPI.

The most striking aspect of the library is that it carried the version numbers 0.34.3, 0.34.4, and 0.34.5. The latest version of the legitimate “solana” package is 0.34.3. This clearly indicates an attempt on the part of the threat actor to trick users looking for “solana” into inadvertently downloading “solana-py” instead.

What’s more, the rogue package borrows the real code from its counterpart, but injects additional code in the “__init__.py” script that’s responsible for harvesting Solana blockchain wallet keys from the system.

This information is then exfiltrated to a Hugging Face Spaces domain operated by the threat actor (“treeprime-gen.hf[.]space”), once again underscoring how threat actors are abusing legitimate services for malicious purposes.

The attack campaign poses a supply chain risk in that Sonatype’s investigation found that legitimate libraries like “solders” make references to “solana-py” in their PyPI documentation, leading to a scenario where developers could have mistakenly downloaded “solana-py” from PyPI and broadened the attack surface.

“In other words, if a developer using the legitimate ‘solders’ PyPI package in their application is mislead (by solders’ documentation) to fall for the typosquatted ‘solana-py’ project, they’d inadvertently introduce a crypto stealer into their application,” Sharma explained.

“This would not only steal their secrets, but those of any user running the developer’s application.”

The disclosure comes as Phylum said it identified hundreds of thousands of spam npm packages on the registry containing markers of Tea protocol abuse, a campaign that first came to light in April 2024.

“The Tea protocol project is taking steps to remediate this problem,” the supply chain security firm said. “It would be unfair to legitimate participants in the Tea protocol to have their remuneration reduced because others are scamming the system. Also, npm has begun to take down some of these spammers, but the takedown rate does not match the new publication rate.”

Ravie Lakshmanan

Leave a Comment

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

loader-image
London, GB
12:44 pm, Feb 2, 2025
weather icon 7°C
L: 6° | H: 8°
clear sky
Humidity: 76 %
Pressure: 1022 mb
Wind: 7 mph SSW
Wind Gust: 9 mph
UV Index: 0
Precipitation: 0 mm
Clouds: 6%
Rain Chance: 0%
Visibility: 10 km
Sunrise: 7:37 am
Sunset: 4:51 pm
DailyHourly
Daily ForecastHourly Forecast
Today 9:00 pm
weather icon
6° | 8°°C 0 mm 0% 6 mph 79 % 1026 mb 0 mm/h
Tomorrow 9:00 pm
weather icon
2° | 9°°C 0 mm 0% 9 mph 89 % 1025 mb 0 mm/h
Tue Feb 04 9:00 pm
weather icon
7° | 11°°C 0.2 mm 20% 13 mph 89 % 1027 mb 0 mm/h
Wed Feb 05 9:00 pm
weather icon
4° | 8°°C 0 mm 0% 10 mph 84 % 1045 mb 0 mm/h
Thu Feb 06 9:00 pm
weather icon
2° | 8°°C 0 mm 0% 8 mph 84 % 1045 mb 0 mm/h
Today 3:00 pm
weather icon
7° | 8°°C 0 mm 0% 6 mph 69 % 1023 mb 0 mm/h
Today 6:00 pm
weather icon
5° | 6°°C 0 mm 0% 3 mph 73 % 1024 mb 0 mm/h
Today 9:00 pm
weather icon
4° | 4°°C 0 mm 0% 3 mph 79 % 1026 mb 0 mm/h
Tomorrow 12:00 am
weather icon
3° | 3°°C 0 mm 0% 3 mph 81 % 1025 mb 0 mm/h
Tomorrow 3:00 am
weather icon
2° | 2°°C 0 mm 0% 4 mph 84 % 1025 mb 0 mm/h
Tomorrow 6:00 am
weather icon
2° | 2°°C 0 mm 0% 4 mph 85 % 1025 mb 0 mm/h
Tomorrow 9:00 am
weather icon
3° | 3°°C 0 mm 0% 4 mph 85 % 1025 mb 0 mm/h
Tomorrow 12:00 pm
weather icon
8° | 8°°C 0 mm 0% 7 mph 80 % 1025 mb 0 mm/h
Name Price24H (%)
Bitcoin(BTC)
€95,158.18
-3.54%
Ethereum(ETH)
€2,956.21
-6.06%
XRP(XRP)
€2.69
-6.97%
Tether(USDT)
€0.96
-0.01%
Solana(SOL)
€201.96
-8.30%
USDC(USDC)
€0.96
0.00%
Dogecoin(DOGE)
€0.282904
-9.94%
Shiba Inu(SHIB)
€0.000016
-8.98%
Pepe(PEPE)
€0.000012
-9.85%
Scroll to Top