Malicious npm Packages Target Cursor Users on macOS: A Deep Dive into a New Supply Chain Threat

Listen to this Post

Featured Image
Cybersecurity researchers have uncovered a troubling wave of malicious npm packages specifically crafted to attack the macOS version of Cursor, a widely used AI-powered source code editor. This campaign is another stark reminder that the software supply chain remains a top target for attackers aiming to quietly compromise developers through tools they trust.

The attack is centered around three npm packages masquerading as developer tools offering access to a “cheapest Cursor API.” Beneath the surface, these packages exfiltrate user credentials, download an encrypted secondary payload, and stealthily overwrite core files in Cursor—effectively hijacking the application. To evade detection and ensure long-term persistence, the malware disables automatic updates and restarts the compromised editor with injected malicious logic.

What’s especially dangerous is that these packages—aiide-cur, sw-cur, and one unnamed in the public release—are still available on npm and have been downloaded more than 3,200 times. The attackers leveraged enticing names and descriptions to lure in developers, many of whom are likely drawn to AI tools that claim to offer affordability or increased efficiency.

The deeper danger is in how this threat has evolved. Attackers have weaponized npm, one of the most trusted repositories in the software development ecosystem, to deliver code that compromises entire development environments. It’s not just about stealing credentials anymore—it’s about persistent access, full code execution rights, and stealthy operation under the guise of legitimate software tools.

In a parallel but equally concerning discovery, Socket also found two npm packages—pumptoolforvolumeandcomment and debugdogs—that operate in tandem to steal cryptocurrency wallet data from BullX trading users on macOS. These packages, downloaded several hundred times, send stolen data to a Telegram bot, showcasing a new wave of highly targeted, financially motivated attacks.

Adding to the concern is a separate incident involving a legitimate npm package—rand-user-agent—which was compromised in a supply chain attack. Multiple versions were injected with a remote access trojan (RAT), allowing attackers to execute shell commands and exfiltrate files. The malicious versions were pulled down only after being reported, but not before potentially compromising users.

This disturbing series of incidents underscores the critical need for developers to vet every dependency, even those from seemingly trusted sources.

What Undercode Say:

The recent discovery of malicious npm packages targeting the Cursor code editor on macOS reveals a deeply strategic evolution in supply chain attacks. This is no longer the domain of broad, unsophisticated malware—attackers are now crafting tailored payloads aimed squarely at high-value users: developers, AI enthusiasts, and cryptocurrency traders.

The method of compromise is particularly noteworthy. These npm packages didn’t just inject a few suspicious lines—they rewrote core application logic, disabled self-repair systems like auto-update, and restarted the compromised environment, ensuring persistence. This is precision malware engineering designed to blend into trusted workflows, making detection significantly harder.

Three trends are evident from this attack:

  1. Trust Exploitation: Developers trust npm by default. That trust is being turned against them. These packages used naming conventions and taglines that appealed to a niche but growing market—those looking for affordable access to AI APIs.
  2. Platform-Specific Targeting: The malware specifically targeted macOS versions of Cursor. This narrows the scope of infection but dramatically increases the chances of success among the chosen demographic: developers on Apple machines.
  3. Crypto-Driven Motives: With the BullX-related packages, we see a clear pivot toward financial theft. Cryptocurrency wallets, trading logs, and keys are lucrative targets, and the malware authors embedded Telegram-based exfiltration for real-time theft.

For developers and security professionals, this should raise an urgent call to action:

Automated Dependency Checks are no longer optional. Tools like Socket, Snyk, or npm audit must be integrated into CI/CD pipelines.
Runtime Monitoring should be implemented on developer machines, especially those interacting with AI or crypto systems.
Behavioral Analysis of third-party packages can help detect actions like overwriting main.js or disabling auto-updates—classic red flags in persistent malware attacks.

This isn’t just an issue of malicious code slipping past manual review. This is a systemic security gap in how developers import and trust code. If attackers can repeatedly sneak malware into production environments through npm, it won’t be long before one of these incidents escalates into a full-scale breach affecting enterprise software, AI models, or blockchain networks.

The community needs better visibility, stronger verification mechanisms, and widespread awareness campaigns to mitigate this growing threat. Undercode will continue tracking these vectors and exposing how trust can be weaponized—and what can be done to reclaim it.

Fact Checker Results

Confirmed: The npm packages mentioned were found live at the time of reporting, still downloadable from the registry.
Verified: Payload URLs and Telegram exfiltration methods are consistent with prior documented macOS malware campaigns.
Noted: The ‘rand-user-agent’ compromise follows known patterns of trojanized packages previously seen in npm-related incidents.

Prediction

The trajectory of these attacks points to a future where software supply chains are the primary battleground for cyberwarfare. As AI tools, cryptocurrency platforms, and code editors become more interconnected, attackers will increasingly blend social engineering with code manipulation. Expect the next wave of attacks to focus on cross-platform tools that blur the lines between development, finance, and artificial intelligence—because where there’s trust and complexity, there’s opportunity for exploitation.

Stay alert. Dependencies are not just code—they’re potential threats.

References:

Reported By: thehackernews.com
Extra Source Hub:
https://www.linkedin.com
Wikipedia
Undercode AI

Image Source:

Unsplash
Undercode AI DI v2

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram