Anatomy of a Supply Chain Attack on an AI Coding Tool's Extension Marketplace and How to Defend Against It
This post breaks down a supply chain attack that poisoned two versions of plugins in an AI coding tool's extension marketplace. It walks through the four-step attack chain, what the malicious code did, which data was unaffected, how users can check and clean up their systems, and what plugin platforms, companies, and developers can do to reduce this risk.
What Happened: A Supply Chain Poisoning That Bypassed Core Defenses
Recently, the extension marketplace of a popular AI coding tool suffered a typical software supply chain attack. The attacker did not break into the tool’s core systems directly. Instead, they followed a chain that began with a leaked vendor key. They started from an unmasked, read-only data bucket and worked their way into the marketplace’s distribution cache. From there, they published two plugin versions containing malicious code.
The most important point about this incident is that the problem was not a backdoor in the plugins themselves. The problem was that the marketplace’s cache and distribution path were an attack surface. The attacker never touched a production server belonging to the tool’s developer, yet they still poisoned thousands of end users.
The Four-Step Attack Chain: Each Step Crossed a Trust Boundary
Step 1: A Leaked Access Key at the Vendor
The tool’s developer outsourced part of its inference and training work to an external service provider. It gave that provider a key to access shared data. The key was exposed on the provider’s side. The attacker obtained it and read a read-only storage bucket shared by both parties.
This step shows a classic case of “third-party trust amplification.” A company’s security depends on how well the recipient of its credentials protects them, and the company that issued the credentials often has little visibility into the recipient’s security posture.
Step 2: Unmasked Agent Traces in the Shared Bucket
The bucket stored session traces from the coding agent. These included a large amount of data from sessions where privacy mode was not enabled. More seriously, some traces still contained access credentials that had not been fully removed. The official account states that affected credentials make up less than 0.01% of the traces. For an attacker, that was still enough.
Engineering teams may see trace data as debugging material. Attackers see it as a rich source of credentials. Any data written to logs, traces, or debug snapshots should be treated as something that unauthorized parties may eventually see.
Step 3: Lateral Movement Into Internal SaaS Tools
Using credentials extracted from the traces, the attacker gained access to several third-party collaboration and service systems that the tool’s team used. They reached some non-production source code repositories, customer service data, and usage data. This step did not directly cause any user losses. However, it gave the attacker the distribution channel credentials they needed for the next step.
Step 4: Publishing Malicious Versions Directly to the Marketplace Cache
With the stolen credentials, the attacker wrote two tampered malicious plugin versions directly into the marketplace’s distribution cache. Two details matter here:
- The plugin’s real maintainer never published these two version numbers. They appeared out of nowhere.
- The malicious package never existed in the upstream public extension repository. The contamination occurred only in the target’s cache layer.
This means that even if the upstream supply chain is completely clean, a write to the downstream distribution cache can still cause users to install a malicious artifact.
How the Malicious Code Behaved
The tampered plugin versions affected only desktop operating systems. They remained available in the marketplace for about 11 hours. Up to about 5,000 users may have installed them. The malicious code performed three main actions:
- Collected environment information: It gathered the hostname, username, OS version, email addresses from version control configuration, and the IP address. The attacker used this data to evaluate how valuable each target was.
- Installed a persistent backdoor: It added an SSH public key controlled by the attacker to the user’s list of authorized keys. This allowed the attacker to log in remotely to the infected host without a password.
- Established a reverse tunnel: It opened a reverse connection from the infected host, which got around inbound firewall restrictions.
It is especially important to note that uninstalling the plugin alone does not remove the threat. The malicious code leaves a separate persistent script on the system that keeps running. Users must follow the steps in the security advisory to complete a full investigation.
What Was Not Affected
The incident did not affect the following: prompts and code from sessions with privacy mode enabled, users’ code repositories, inference requests in progress, and the official client’s own update channel. The attacker’s last activity was blocked several days later.
Identifying what was not affected helps users assess their actual exposure. It avoids unnecessary alarm and makes the investigation more targeted.
Incident Response: What Individual Users Should Do
If you installed or updated the relevant plugins from this extension marketplace recently, check the following in order:
- Verify version numbers: Confirm whether you installed either of the two specific versions involved in the incident. Other versions are not affected.
- Check the SSH authorized keys file: Look at
~/.ssh/authorized_keysfor unfamiliar public key entries. Pay particular attention to entries with suspicious comments, such as ones that pose as telemetry services. - Look for persistent processes: Check scheduled tasks, startup items, and running processes for unknown scripts or abnormal network tunnel processes.
- Rotate credentials: Whether or not you were affected, use this opportunity to rotate API keys and access tokens you no longer use. Also clean up any historical session traces that may contain leftover credentials.
- Reinstall and verify: After cleanup, reinstall the plugin from an official source and confirm that the version’s origin is trustworthy.
Defensive Takeaways: Turning Trust Into Verifiable Mechanisms
For Developer Tool and Plugin Platforms
- Treat distribution caches as part of the attack surface: Cache write paths need independent strong authentication and audit logging. Artifact publishing should be bound to upstream signature verification, which prevents versions from appearing without a source.
- Redact data before storage: Any traces and logs written to shared storage should have credentials identified and removed before they are persisted. Cleaning up after the fact is not enough.
- Minimize vendor key scope: Credentials issued to third parties should follow the principles of least privilege, short validity periods, and fast revocation. Usage should be monitored with alerts.
For Companies and Developers
- Reduce scattered credentials: Do not pass keys in plaintext through code, configuration files, or conversation context. Store them centrally in a key management service.
- Install only the plugins you need: Pay attention to each plugin’s publisher and update frequency. Be cautious of new versions that appear suddenly.
- Establish endpoint baseline checks: Include SSH authorized keys files, persistent processes, and outbound connections in routine reviews. Use logging services and monitoring alerts to detect unexpected changes quickly.
Conclusion
The main lesson from this incident is that the security boundary of a modern developer toolchain extends well beyond the core system. It reaches every link: vendors, shared data, SaaS collaboration tools, and distribution caches. Attackers always target the weakest link. For individual developers, rotating credentials and checking system baselines on a regular schedule is a low-cost habit with high value. For platform operators, protecting the artifact distribution path as carefully as a production system is now a basic requirement.
