Malicious AI-Generated NPM Package @kodane/patch-manager Drains Over 1,500 Solana Wallets Before Swift Takedown

Listen to this Post

Featured Image
In a stark reminder of how advanced cybercriminal tactics have become, a newly discovered npm package named @kodane/patch-manager was found to be a cleverly disguised cryptocurrency wallet drainer targeting Solana users. Despite its brief lifespan, the package was downloaded over 1,500 times before it was removed from the npm repository on July 28, 2025. This incident exposes the growing threat of AI-assisted malware and the evolving sophistication of supply chain attacks in the developer ecosystem.

the Incident

The malicious npm package @kodane/patch-manager was uploaded to the npm registry on July 28, 2025, masquerading as a legitimate tool for license validation and registry optimization. However, beneath this veneer was a sophisticated cryptocurrency wallet drainer designed to silently steal funds from developers and users alike. Cybersecurity firm Safety detailed the attack, revealing that the package employed a postinstall script that renamed and concealed files inside disguised cache folders, evading detection across major operating systems like macOS, Linux, and Windows. On Windows specifically, the package used the attrib +H command to hide its directories, enhancing stealth.

Persistence was maintained via a background script called connection-pool.js, which connected infected machines to a live command-and-control (C2) server. This server logged the thefts of Solana wallets without requiring authentication. Once a wallet was identified, another script, transaction-cache.js, drained nearly all funds, leaving only enough for transaction fees. The stolen tokens were sent to a hardcoded Solana address, which showed high activity likely linked to the more than 1,500 compromised systems.

An unusual aspect of this campaign was the publicly accessible C2 infrastructure—an oversight that allowed researchers a rare glimpse into the attacker’s operations. The package’s author, “Kodane” (meaning “offspring” in Japanese), released 19 versions of the malware within just two days, hinting at a frantic development and deployment cycle. Timestamp analysis suggested a UTC+5 time zone origin, implicating regions such as Russia, China, or India.

Further investigation revealed that the malicious code was likely AI-generated. The package featured well-written documentation, descriptive code comments, and unique traits such as emojis in code and repetitive “Enhanced” tags on filenames, typical of AI code generation tools like Claude. This blend of professional polish and malicious intent demonstrates how AI tools are being weaponized to craft deceptive malware that slips past human and automated detection.

What Undercode Say:

The discovery of the @kodane/patch-manager npm package marks a critical evolution in cyber threats, where artificial intelligence is no longer just a tool for defenders but is increasingly exploited by attackers to enhance their offensive capabilities. This incident underscores several key trends and lessons for the tech and security communities.

The Rising Role of AI in Malware Development

Cybercriminals are harnessing AI to create malware that is both technically sophisticated and deceptively polished. AI-generated code, with its clean syntax, structured comments, and professional documentation, reduces the chance of raising suspicion. This not only increases the likelihood of downloads but also complicates efforts to identify malicious packages through automated scans or manual review. The pattern of “enhancement” and detailed markdown usage signals a new wave of malware that blurs the line between legitimate open-source projects and harmful software.

Supply Chain Attacks Growing More Insidious

By embedding malware into widely used package repositories like npm, attackers exploit the implicit trust developers place in these ecosystems. Once integrated into a development pipeline, such malicious packages can silently siphon cryptocurrency or cause further downstream damage in production environments. This attack highlights the urgent need for enhanced supply chain security, including stricter vetting processes, behavioral analysis of packages post-installation, and continuous monitoring of dependencies.

Importance of Community Awareness and Rapid Response

The swift takedown of @kodane/patch-manager after just 1,500+ downloads shows the effectiveness of vigilant cybersecurity research and community reporting. However, even a short window is enough for significant financial damage. Developers must remain cautious of suspicious or newly published packages, especially those with rapid version releases and unusual metadata.

Emerging Indicators of AI-Generated Threats

Identifying AI-assisted malware requires new detection methodologies. Behavioral analysis combined with code pattern recognition — such as repetitive naming conventions, overuse of emojis, and unnatural documentation styles — can flag suspect packages. The community needs to build and share intelligence on such indicators of compromise (IOCs) to stay ahead.

Fact Checker Results ✅

The malicious package was indeed uploaded on July 28, 2025, and removed shortly after.
Over 1,500 downloads occurred before detection, confirming the widespread exposure.
The C2 server was publicly accessible, an unusual but verified detail allowing detailed forensic analysis.

📊 Prediction: The Future of AI-Driven Malware and Developer Ecosystems

The use of AI in crafting malware will only accelerate, with attackers refining techniques to evade detection and exploit supply chain vulnerabilities. We can expect more AI-generated packages infiltrating software repositories, making automated vetting systems inadequate without contextual behavioral insights. Developers will need to adopt multi-layered defenses, combining static code analysis with dynamic runtime monitoring.

Open-source communities might push for AI-powered tools that not only generate code but also detect AI-generated malicious patterns. Collaboration between cybersecurity firms, package registry maintainers, and developer communities will be crucial to preemptively identify and isolate such threats.

Finally, as cryptocurrencies remain prime targets for theft via malware like @kodane/patch-manager, wallet security will become an even higher priority. Innovations in wallet design, transaction verification, and anomaly detection will be essential to protect users from silent, AI-enhanced attacks lurking deep in development pipelines.

The @kodane/patch-manager episode serves as a wake-up call: AI is a double-edged sword in cybersecurity, and only a proactive, informed approach will safeguard the developer and crypto ecosystems from the next generation of digital threats.

🕵️‍📝✔️Let’s dive deep and fact‑check.

References:

Reported By: securityaffairs.com
Extra Source Hub:
https://www.discord.com
Wikipedia
OpenAi & Undercode AI

Image Source:

Unsplash
Undercode AI DI v2

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeNews & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky | 🐘Mastodon