A new variant of the GlassWorm malware is actively targeting developers using macOS. The campaign, highlighted by Acronis, leverages malicious extensions for popular code editors Visual Studio Code and OpenVSX to deliver its payload. This marks a strategic shift for the threat actor, who previously focused on Windows. The malware is a self-propagating worm designed for stealth and data theft. It uses encrypted payloads, delayed execution to bypass sandboxes, and LaunchAgents for persistence. Its primary objective is to steal sensitive developer credentials, including GitHub and npm tokens, browser data, and cryptocurrency wallet information, posing a direct threat to both individual developers and the broader software supply chain.
GlassWorm is a multi-stage, data-stealing worm that has been active since at least October 2025. This fourth observed wave of activity demonstrates a clear pivot towards the Apple ecosystem and the developer community. By hiding within seemingly legitimate VS Code extensions, the malware abuses the trust developers place in the tools and marketplaces they use daily.
The attack vector is social engineering, tricking developers into installing a malicious extension from the VS Code Marketplace or OpenVSX registry. Once installed, the malware's lifecycle begins:
LaunchAgent, ensuring it runs automatically every time the user logs in.The malware's TTPs are tailored for the macOS environment and developer targets.
Initial Access (T1195.001): The attack begins with the developer installing a compromised or malicious VS Code extension, a form of Compromise Software Dependencies and Development Tools.
Defense Evasion (T1497.003 - Time Based Evasion): The 15-minute sleep delay is a classic sandbox evasion technique. The payload is also encrypted to hinder static analysis (T1027 - Obfuscated Files or Information).
Execution (T1059.002 - AppleScript): The use of AppleScript for execution is a common technique for malware on macOS, as it is a built-in scripting language that can interact with the OS and other applications.
Persistence (T1543.001 - Launch Agent): By creating a .plist file in the ~/Library/LaunchAgents directory, GlassWorm ensures it is automatically re-launched by the OS upon user login, a standard macOS persistence mechanism.
Credential Access (T1555.003 - Credentials from Web Browsers): The malware is specifically coded to find and exfiltrate credentials from browser databases, GitHub/npm configuration files, and over 50 types of cryptocurrency wallets.
| Tactic | Technique ID | Technique Name |
|---|---|---|
| Initial Access | T1195.001 |
Compromise Software Dependencies and Development Tools |
| Execution | T1059.002 |
AppleScript |
| Persistence | T1543.001 |
Launch Agent |
| Defense Evasion | T1497.003 |
Time Based Evasion |
| Credential Access | T1555.003 |
Credentials from Web Browsers |
| Collection | T1560 |
Archive Collected Data |
The impact of a successful GlassWorm infection is significant, particularly for the software supply chain:
Hunting for GlassWorm involves looking for signs of its presence on macOS endpoints:
| Type | Value | Description |
|---|---|---|
| file_path | ~/Library/LaunchAgents/ |
Look for recently created or suspicious .plist files in this directory. |
| process_name | osascript |
Monitor for osascript (the AppleScript execution engine) being launched by unusual parent processes, like VS Code. |
| command_line_pattern | * |
Analyze shell history for unusual commands executed by VS Code's integrated terminal. |
| file_path | ~/.npmrc, ~/.git-credentials |
Monitor for anomalous access to these credential files by unexpected processes. |
Code -> osascript), and unauthorized access to sensitive files like the SSH key folder or browser credential stores. This leverages Process Analysis (D3-PA).Securing developer endpoints is key to mitigating this threat.
Limit Software Installation (M1033): In corporate environments, consider creating an allowlist of approved VS Code extensions. This prevents developers from installing potentially malicious extensions from the public marketplace. This is a form of Executable Allowlisting (D3-EAL) applied to extensions.
Privileged Account Management (M1026): Developers should not run as local administrators on their machines. This can limit the malware's ability to establish persistence or access system-level files.
Credential Protection: Encourage the use of hardware tokens (e.g., YubiKey) for Git commit signing and for accessing sensitive services. Avoid storing plaintext credentials or tokens in configuration files whenever possible. Use the macOS Keychain or other secure vaults to store secrets.
Antivirus/Antimalware (M1049): Use a reputable next-generation antivirus (NGAV) solution for macOS that can detect and block known malware like GlassWorm and identify suspicious behaviors.
Restricting which VS Code extensions can be installed can prevent the initial infection.
Mapped D3FEND Techniques:
Using a macOS-specific EDR/NGAV can detect the malicious behaviors of GlassWorm, such as creating LaunchAgents.
Mapped D3FEND Techniques:
Running as a standard user can limit the malware's ability to establish persistence and access system-wide files.
To combat the supply chain threat posed by malicious VS Code extensions like those used by GlassWorm, organizations should implement a form of Executable Allowlisting specifically for editor extensions. Instead of allowing developers to install any extension from the public marketplace, the security team should curate a list of vetted, approved extensions. This can be enforced through policy settings within VS Code. Any attempt to install an extension not on this list would be blocked. This shifts from a reactive 'detect bad' model to a proactive 'only allow good' model, drastically reducing the attack surface presented by the developer's IDE.
Detecting GlassWorm post-infection requires robust Process Analysis on the macOS endpoint, typically via an EDR. Security teams should create detection rules for anomalous process chains originating from VS Code. For example, a rule should alert if the VS Code process (Code) spawns an osascript process, as this is a key part of GlassWorm's execution chain and is not normal behavior for the editor. Further rules can detect osascript or other processes attempting to write a .plist file to the ~/Library/LaunchAgents directory. This behavioral approach is more resilient than signature-based detection and can catch the malware's core TTPs.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats