Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Malware & Threats

Malicious NPM Packages Target Cursor AI’s macOS Users

Three NPM packages posing as developer tools for Cursor AI code editor’s macOS version contain a backdoor.

Three malicious NPM packages posing as developer tools for the popular Cursor AI code editor were caught deploying a backdoor on macOS systems, vulnerability detection firm Socket reports.

Cursor is a proprietary integrated development environment (IDE) that integrates AI features directly within the coding environment. It offers tiered access to LLMs, with premium language models priced per request.

The packages, named swcur, swcur1, and aiide-cur, claim to provide cheap access to Cursor, exploiting the developers’ interest in avoiding paying the fees.

All three packages were published by a threat actor using the NPM usernames gtr2018 and aiide, and have amassed over 3,200 downloads to date.

“As of this writing, these packages remain live on the NPM registry. We have formally petitioned for their removal,” Socket warns.

Upon execution, a malicious script contained by these packages harvests user credentials, fetches a payload from a remote server and decrypts and decompresses it.

Advertisement. Scroll to continue reading.

It also replaces Cursor code with malicious code supplied by the attacker, and restarts the application to obtain persistent remote execution capabilities within the IDE.

Additionally, the vulnerability detection firm noticed that sw‑cur would disable Cursor’s auto-update mechanism, likely to prevent removal.

“The attack specifically targets macOS installations of this application by modifying internal files such as main.js under the /Applications/Cursor.app/… path. The malware uses the editor’s trusted runtime to execute threat actor-controlled code and maintain persistence,” Socket notes.

All three packages use the same credential exfiltration, payload retrieval, decryption, and file-patching routines, albeit they use different hardcoded domains.

The attack, Socket warns, could lead not only to credential and code theft, or additional malware infections, but also to unauthorized access to paid services and any codebase opened within the IDE.

“In enterprise environments or open source projects, the risks multiply. A trojanized IDE on a developer’s machine can leak proprietary source code, introduce malicious dependencies into builds, or serve as a foothold for lateral movement within CI/CD pipelines,” Socket notes.

Cursor users who downloaded any of these packages are advised to restore Cursor from a trusted source, rotate credentials, and audit their code for potential unauthorized changes.

Related: Hundreds Download Malicious NPM Package Capable of Delivering Rootkit

Related: Dozens of Malicious NPM Packages Steal User, System Data

Related: Developers Warned of Malicious PyPI, NPM, Ruby Packages Targeting Macs

Related: Malicious NPM, PyPI Packages Stealing User Information

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Organizations are investing heavily in third-party risk management, but breaches, delays, and blind spots continue to persist. Join this live webinar as we examine the gap between how organizations think their third-party risk programs are performing and what’s actually happening in practice.

Register

Delve into big-picture strategies to reduce attack surfaces, improve patch management, conduct post-incident forensics, and tools and tricks needed in a modern organization.

Register

People on the Move

Tim Byrd has been appointed Chief Information Security Officer at First Citizens Bank.

IRONSCALES has named Steve McKenzie as Chief Operating Officer.

Silvio Pappalardo has joined AuthMind as Chief Revenue Officer.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.