AI Coding Tool Plugin Supply Chain Poisoning: Attack Chain Analysis and Self-Check Guide

    This article analyzes a supply chain poisoning incident involving an LLM-powered AI coding assistant plugin. It walks through the attack chain—from an upstream credential leak and session data theft to extension marketplace cache hijacking—and explains how to assess exposure by time window, installation source and update mechanism, and operating system. It then provides practical self-check commands for SSH authorized_keys backdoors and IOC artifacts, followed by enterprise-grade mitigations covering credential and session management, software supply chain integrity verification, and EDR/SIEM-based detection and audit.

    1. Attack Chain and Supply Chain Security Analysis

    In modern software development, the combination of AI coding tools and AI-assisted plugins greatly improves development efficiency, but it also introduces new supply chain security risks. A recent supply chain poisoning incident targeting an AI coding tool serves as a warning.

    The attack chain is highly representative and mainly consists of the following stages:

    1. Upstream Credential Leak: The incident began with an access key issued by the tool vendor to a partner. Due to a security oversight on the partner side, the key was leaked.
    2. Session Data Theft and Credential Extraction: The attacker used the stolen key to obtain a batch of Agent session records that had not enabled privacy mode. These records contained some sensitive credentials that had not been redacted, such as API keys and tokens. Using this as a stepping stone, the attacker successfully infiltrated several third-party SaaS tools used by the tool vendor.
    3. Extension Marketplace Cache Hijacking: After gaining certain privileges, the attacker placed tampered versions of an LLM-powered AI coding assistant plugin (involving two specific versions) directly into the editor’s extension marketplace cache. Because the cache was polluted, these backdoored plugins were distributed to end users for about 11 hours, with potentially up to thousands of users installing the affected versions.

    It is worth emphasizing that the vendor later clarified that the plugin’s upstream open-source public repository was never poisoned. This was not a vulnerability in the LLM product itself, and neither the editor client nor the official update channel was affected. This indicates that the attacker precisely exploited the trust mechanism of the distribution cache. Such incidents highlight the fragility of “trust transfer” in the software supply chain: as long as one link in the chain—such as a partner or the cache mechanism—has a vulnerability, malicious payloads can reach developer endpoints under a legitimate appearance.

    2. Affected Scope and Precondition Assessment

    When facing such security incidents, panic is not helpful. The first task is to accurately assess whether your environment falls within the affected scope. According to the details disclosed, only developer environments that simultaneously meet the following three conditions require deeper investigation.

    1. Time Window Determination

    The maliciously tampered plugin was distributed through the cache only within a specific time window. Based on time zone conversion, the affected period was from 17:27 Beijing time on the 29th of a specific month to 04:35 the following day. Only environments that performed plugin installation or update operations during this period are at risk.

    2. Plugin Source and Update Mechanism

    The affected plugin must have been installed or updated directly through the editor’s built-in extension marketplace. If the developer enabled the editor’s automatic update feature and an update was triggered within this time window, the environment is also affected. If the installation package was manually downloaded from another channel, it is not within the scope of this poisoning incident.

    3. Operating System Platform Restriction

    The tampered packages delivered by the attacker were targeted and covered only the two mainstream desktop operating systems: macOS and Windows. Developer environments running on Linux or other platforms are not affected by this specific tampered package.

    After clarifying the preconditions, developers can first check the installed plugin version on the local machine via the command line to confirm whether an affected version is present:

    1. # Check the editor extension directory on Unix-like systems
    2. ls ~/.<editor-name>/extensions | grep -i "<LLM-plugin-name>"
    3. # If the command-line tool is installed, you can also use:
    4. <editor-command-line-tool> --list-extensions --show-versions | grep -i "<LLM-plugin-name>"

    3. In-Depth Security Self-Check Practices

    If your environment is confirmed to meet the affected conditions, an in-depth self-check must be carried out immediately. The core malicious behavior in this poisoning incident was establishing a persistent backdoor, so the focus should be on identifying abnormal persistence mechanisms.

    1. Core Check: SSH Authorized Keys

    According to the security advisory, the malicious plugin silently appends an attacker-preset public key to the developer’s SSH authorized keys list at runtime, with the key comment disguised as svc-telemetry. This is a very classic persistence technique. Once the public key is written, the attacker can log in to the victim host via SSH without a password.

    macOS / Linux check command:

    1. grep -qs "svc-telemetry" ~/.ssh/authorized_keys && echo "Warning: suspicious key svc-telemetry found" || echo "Safe: no suspicious key found; this host is not affected"

    Windows PowerShell check command:

    1. $sshFiles = "$HOME\.ssh\authorized_keys", "C:\ProgramData\ssh\administrators_authorized_keys" | Where-Object { Test-Path $_ }
    2. if ($sshFiles -and (Select-String -Path $sshFiles -Pattern "svc-telemetry" -Quiet)) {
    3. Write-Host "Warning: suspicious key svc-telemetry found" -ForegroundColor Red
    4. } else {
    5. Write-Host "Safe: no suspicious key found; this host is not affected" -ForegroundColor Green
    6. }

    2. Persistence Artifacts and IOC Scanning

    In addition to the SSH public key backdoor, malicious programs usually leave other persistence artifacts in the file system. The official indicators of compromise (IOCs) include some specific hidden files, and it is recommended to scan for them as well.

    1. # Scan for suspicious hidden files in the config directory
    2. ls -la ~/.config/.smt 2>/dev/null
    3. # If this file is found, isolate and analyze it immediately

    When developers find any of the above abnormal indicators, they should not only delete the suspicious public keys and files. They should also assume that the machine is fully compromised, force rotation of all credentials stored on the machine (such as cloud platform account passwords and Git tokens), and run a full antivirus scan.

    4. Enterprise Security Protection and Best Practices

    This incident is not only a self-check guide for endpoint developers but also a cautionary example for enterprise R&D security. To prevent similar supply chain attacks, enterprises should build a defense-in-depth system from the following dimensions.

    1. Strengthen Key and Session Management

    In this incident, the attacker obtained SaaS tool credentials through unredacted Agent session records. When using various cloud services and SaaS tools, enterprises should strictly control credential exposure. It is recommended to rely on a cloud-based key management service (KMS) for dynamic credential retrieval and periodic rotation, avoiding hardcoded plaintext credentials in code, configuration files, or session logs. At the same time, AI coding tools should enforce strict privacy mode to prevent sensitive context from being uploaded to cloud caches.

    2. Build Software Supply Chain Integrity Verification

    For cache hijacking risks, distribution systems should introduce strong verification mechanisms. Whether using object storage or CDN for plugin distribution, digital signature verification should be enforced. When clients pull or update plugins, they must compare hash values or verify signing certificates to ensure that files have not been tampered with during transmission and caching. Any package with a signature mismatch should be rejected for installation and trigger a security alert.

    3. Introduce Endpoint Detection and Log Audit (EDR & SIEM)

    For persistence behaviors such as SSH public key backdoors, traditional signature-based antivirus software often struggles to detect them. Enterprises should deploy endpoint detection and response (EDR) solutions to monitor abnormal changes to critical system files such as authorized_keys, scheduled tasks, and startup items. At the same time, these endpoint logs should be aggregated into a unified log audit service. Combined with behavior analysis models, once SSH key writes outside working hours or SSH login attempts from unknown IPs are detected, the security team should be notified immediately through the monitoring and alerting service.

    In summary, supply chain security in the AI coding era requires joint efforts from developers, tool vendors, and cloud service providers. By establishing strict credential management mechanisms, improving supply chain integrity verification, and implementing continuous endpoint monitoring, organizations can effectively reduce security risks and maintain a clean and stable development environment.