Supply Chain Attack on an AI Coding Tool Extension Marketplace: SSH Backdoor Analysis and Defense

    This article breaks down a supply chain attack on an AI coding tool extension marketplace, from a leaked vendor access key to malicious extension versions planted in the marketplace's distribution cache. It explains how the malware behaves, including its SSH backdoor and reverse tunnel, and gives developers and enterprises an incident response checklist and supply chain defense practices.

    Supply Chain Attack on an AI Coding Tool Extension Marketplace: Attack Chain Analysis and Defense

    A supply chain attack on an AI coding tool extension marketplace has drawn wide attention in the developer community. This incident was more than malicious code being inserted into a plugin. Its key lesson is that the attacker bypassed the target system’s core defenses entirely. The attacker used a leaked key from an external vendor as the entry point, used an unredacted read-only data bucket as a stepping stone, and finally poisoned the marketplace’s distribution cache. This pattern of moving laterally across trust boundaries exposes deep supply chain security risks in modern cloud-native development environments.

    This article reviews the full attack chain based on officially disclosed facts, analyzes how the malicious code behaves, and provides developers and enterprises with a detailed incident triage guide and supply chain security best practices.

    1. Attack Chain: Four Steps Across Trust Boundaries

    The attacker’s methods were highly covert and logically structured. The attack chain had four key steps, and each one targeted a weak point at a trust boundary.

    1. Access key leaked by an external compute provider
    AI coding tool vendors often hand part of their large model inference and training workloads to external compute providers. In this incident, the vendor granted an external compute provider an access key for a shared resource. That key was accidentally exposed on the provider’s side. With the key, the attacker gained access to a read-only object storage bucket that both parties shared. This is a typical case of the weakest link problem in cross-organization cooperation: security is only as strong as the weakest party.

    2. Unredacted agent trace logs exposed
    The read-only data bucket stored a large volume of coding agent interaction traces, dating from around 2025. Some sessions did not have strict privacy mode enabled, so these records contained a small number of credentials that had not been removed. According to reported figures, less than 0.01% of customer API credentials were exposed this way. Even when access to object storage is restricted, sensitive data can still serve as a stepping stone for lateral movement if there is no effective data-at-rest redaction, also known as data loss prevention (DLP).

    3. Credential theft and lateral movement into internal SaaS tools
    The attacker used the small number of credentials collected from the trace logs to log in to several SaaS tools that the AI coding tool vendor used. Through these tools, the attacker learned more about some non-production source code repositories, customer support data, and system usage data. At this stage, the attacker moved from an external read-only visitor to an internal observer within the development environment. This gave the attacker enough intelligence to plan a more damaging attack.

    4. Poisoning the extension marketplace distribution cache
    After gathering information about internal systems, the attacker used the stolen credentials to inject two malicious extension package versions directly into the marketplace’s distribution cache. The attacker altered two specific versions of a popular code assistant extension: 2.1.312 and 2.1.313. The developer had never published these two versions, and the malicious packages never appeared in the upstream open source extension repository. This shows that the marketplace’s caching mechanism itself became an attack surface, and that integrity checks at the distribution stage did not block the tampering.

    2. Malicious Behavior and Scope of Impact

    The affected malicious extension versions targeted Windows and macOS systems. They were available in the marketplace for about 11 hours, and up to 5,000 users may have downloaded and installed them. Once installed, the malicious code performed the following high-risk operations:

    • Sensitive information collection: Silently collected the victim’s hostname, current username, operating system version, Git commit email configuration, and public IP address.
    • SSH backdoor installation: Forcibly added an SSH public key labeled svc-telemetry, which the attacker controlled, to the user’s passwordless login list (authorized_keys).
    • Reverse tunnel creation: Started a reverse tunnel process in the background that forwarded the victim’s network traffic to a server the attacker controlled, providing a covert channel for deeper intrusion.
    • Persistence: The official security advisory states that uninstalling the extension alone may not remove the threat, because the malicious code leaves a separate resident script on the system that keeps running.

    Prompts and code in privacy mode, customer code repositories, active inference requests, and the official client update mechanism were not affected by this attack.

    3. Incident Response and System Triage Guide

    Developers who installed or updated the relevant extension during the incident window should take the following triage and cleanup steps immediately:

    1. Check the version and uninstall the extension
    First, check the version number of the locally installed extension. If version 2.1.312 or 2.1.313 is present, uninstall it immediately. Uninstalling the extension is only the first step. You must continue with the system-level checks below.

    2. Check for the SSH passwordless login backdoor
    Check the authorized_keys files for the current user and the root user. Look for unfamiliar public keys, especially entries with the comment svc-telemetry.

    1. # Check authorized_keys for the current user and root
    2. grep -r "svc-telemetry" ~/.ssh/
    3. grep -r "svc-telemetry" /root/.ssh/

    If you find this key, delete the line from the file immediately. Also check whether the SSH configuration file has been tampered with.

    3. Remove resident processes and reverse tunnels
    Check the system for suspicious resident scripts and abnormal network connections. Use the following commands to inspect abnormal connections and processes:

    1. # List all current network connections and their processes, looking for unusual ESTABLISHED connections
    2. netstat -antlp | grep ESTABLISHED
    3. # Or use the ss command
    4. ss -tunlp
    5. # Check scheduled tasks to rule out persistence through crontab
    6. crontab -l

    If you find an unknown process that is listening or making outbound connections, record its PID and end it with kill -9 <PID>. Then locate its executable path and delete it.

    4. Rotate API keys across the board
    Whether or not you believe you were affected, the attacker briefly had access to sensitive system information. Developers should take this opportunity to rotate all API keys they no longer use, and any keys with elevated permissions, such as code hosting platform tokens and cloud service access keys. This removes the risk of stolen credentials being reused at the source.

    4. Supply Chain Security Practices for Cloud-Native Environments

    This incident is a warning for enterprise development teams. Cloud-native architecture and third-party toolchains are now heavily relied upon, so building a layered supply chain security system is essential. When setting up security baselines, enterprises can draw on the security infrastructure of mature platforms such as Baidu AI Cloud. They can improve their overall defenses in the following areas:

    1. Strengthen key lifecycle management for third-party vendors
    Cross-organization cooperation cannot be avoided, but access keys must follow the principle of least privilege. Use a key management service (KMS) to manage the credentials that vendors use, with regular rotation and revocation at expiry. Also apply strict bucket policies and access control lists (ACLs) to shared object storage buckets. Even read-only access should be limited to specific IP ranges or specific VPC endpoints.

    2. Apply data-at-rest redaction and privacy-preserving controls
    Before agent interaction traces or business data are written to object storage, enforce redaction at the application layer or gateway layer. Credentials that must be retained should be stored encrypted. Use a logging service to detect sensitive fields automatically and mask them. This way, even if a storage bucket is accessed unexpectedly, the attacker cannot read plaintext credentials.

    3. Build integrity checks for the extension distribution pipeline
    For internal plugin marketplaces or dependency package proxy repositories, require code signing and hash verification. Before an artifact is published to the distribution cache, verify that its digital signature comes from a trusted publisher. When syncing from upstream open source repositories, enable mirror consistency checks to block any form of cache poisoning.

    4. Deploy endpoint detection and response (EDR)
    On developer workstations, deploy lightweight EDR agents. Use a centrally managed cloud security policy to monitor and block unexpected writes to authorized_keys and the creation of unauthorized reverse tunnels in real time. When abnormal behavior is detected, trigger an alert and automatically isolate the affected endpoint to keep the threat from spreading to core enterprise code repositories.

    In summary, supply chain attacks are becoming more covert and more chained. Enterprise developers need to look beyond the security of their own code and extend their attention to every trust point upstream and downstream. Strong key management, data redaction, distribution integrity checks, and cloud-native security monitoring together form the defense needed to protect development environments against these threats.