# GlassWorm Supply Chain Attack: 400+ Malicious Repos Identified

> The GlassWorm campaign hits GitHub, npm, and VSCode marketplaces with over 400 malicious repositories. Learn to detect and mitigate this supply chain threat.

- Published: 2026-03-18T00:36:52.000Z
- Severity: high
- Category: Supply Chain
- Tags: GlassWorm, NPM Security, Vscode Extensions, Supply Chain Attack, Malware Analysis
- Author: Runtime Rebel Intel
- Primary source: https://www.bleepingcomputer.com/news/security/glassworm-malware-hits-400-plus-code-repos-on-github-npm-vscode-openvsx/
- Canonical: https://runtimerebel.com/blog/glassworm-supply-chain-attack-400-malicious-repos-identified

## Key points

- GlassWorm malware has compromised over 400 repositories across GitHub, npm, and VSCode Extension Marketplaces, posing significant risks to developer environments and downstream users.
- Affected systems include Node.js development environments, CI/CD pipelines, and VSCode installations using unverified or typosquatted third-party extensions and packages.
- Defenders must immediately audit project dependencies, remove unverified VSCode extensions, and implement strict dependency pinning to prevent automated malicious updates.

A sophisticated multi-registry campaign dubbed GlassWorm has resurfaced, targeting the global developer ecosystem with a coordinated [Supply Chain Attack](/glossary#supply-chain-attack). According to [BleepingComputer](https://www.bleepingcomputer.com/news/security/glassworm-malware-hits-400-plus-code-repos-on-github-npm-vscode-openvsx/), security researchers at Socket identified more than 400 malicious entities, including repositories on GitHub, packages on npm, and extensions within the Visual Studio Code (VSCode) Marketplace and OpenVSX Registry. This campaign demonstrates a high level of automation, designed to flood development pipelines with malicious code that facilitates [RCE](/glossary#rce) upon installation or execution.

## GlassWorm Malware Supply Chain Attack Detection and Scope

The GlassWorm campaign leverages automated scripts to create a massive volume of accounts and repositories. These assets often use typosquatting—mimicking the names of popular utilities—or brandjacking to deceive developers. The primary [TTP](/glossary#ttp) involves the inclusion of obfuscated JavaScript or TypeScript code within legitimate-looking files. For instance, a developer might search for a utility to manage JSON formatting and inadvertently install a compromised extension that appears to offer that functionality.

Once a malicious package is integrated into a project, it typically utilizes `preinstall` or `postinstall` hooks in the `package.json` file. These scripts trigger the execution of a loader, which establishes a connection to a remote [C2](/glossary#c2) server. This initial access is a critical step for attackers, as it allows them to bypass traditional security perimeters that focus on runtime environments rather than the development phase. Security teams must prioritise **detecting malicious npm packages in CI/CD** environments by implementing automated manifest scanning and monitoring for unusual outbound network traffic from build servers.

### Technical Analysis of the GlassWorm Payload

The malware identified in the GlassWorm campaign is multi-staged. The first stage is designed for maximum stealth, avoiding detection by standard [EDR](/glossary#edr) solutions through code minification and dynamic string reconstruction. By obfuscating the destination URLs for secondary payloads, the attackers ensure that simple [IoC](/glossary#ioc) matching fails to identify the threat. 

The second stage often involves the exfiltration of environment variables, including sensitive [Cloud Security](/category/Cloud Security) credentials and API keys. If the compromised developer has elevated permissions, the attacker can achieve [Privilege Escalation](/glossary#privilege-escalation) across the organization's cloud infrastructure. This threat path highlights why a [Zero Trust](/glossary#zero-trust) architecture is necessary even within internal development tools. Furthermore, the malware may attempt [Lateral Movement](/glossary#lateral-movement) by scanning the local network for other vulnerable development machines or internal servers.

### How to Secure VSCode Extensions Against GlassWorm and Related Threats

Securing the development environment requires a shift in how third-party dependencies are managed. Traditional [SOC](/glossary#soc) monitoring often overlooks the IDE as an attack vector, yet VSCode extensions have deep access to the filesystem and shell. Organizations should implement the following mitigations to reduce the risk of GlassWorm infection:

*   **Verify Publisher Identity:** Always check the 'Verified' badge in the VSCode Marketplace and examine the publisher's history before installation.
*   **Dependency Pinning:** Use lockfiles (e.g., `package-lock.json` or `yarn.lock`) to ensure that only specific, audited versions of a package are installed across the team.
*   **Software Bill of Materials (SBOM):** Maintain an updated SBOM to quickly identify if any [CVE](/glossary#cve) or known malicious campaign, such as GlassWorm, has impacted the organization's software stack.
*   **Audit Manifests:** Review `package.json` scripts for any unauthorized `preinstall` or `postinstall` entries that execute external binaries or curl commands.

The scale of this campaign suggests that the threat actor is proficient in bypassing automated registry moderation. By distributing the attack across multiple platforms (npm, VSCode, and GitHub), they increase the likelihood that a developer will encounter a malicious component at some point in their workflow. Mapping these activities against the [MITRE ATT&CK](/glossary#mitre-att-ck) framework (specifically T1195.002: Supply Chain Compromise: Compromise Software Dependencies) provides a structured way for [SIEM](/glossary#siem) administrators to develop detection rules for similar future campaigns.

**Related:** [ForceMemo: Credential Theft Compromises Python Repositories](/blog/forcememo-credential-theft-compromises-python-repositories), [GlassWorm Abuses Open VSX Registry in Supply-Chain Attack](/blog/glassworm-abuses-open-vsx-registry-in-supply-chain-attack)

---

AI-generated analysis from the primary source above; not human-reviewed before publication — verify anything operational against the original (https://runtimerebel.com/editorial). Quote with attribution and a link to the canonical URL: https://runtimerebel.com/blog/glassworm-supply-chain-attack-400-malicious-repos-identified
