From Key Leak to SSH Backdoor: Anatomy of a Supply Chain Attack on a Marketplace Extension

    A supply chain attack that planted two tampered versions into an AI coding assistant's extension marketplace never touched the editor's core systems. Instead, attackers followed a leaked vendor key through a shared read-only bucket, harvested live credentials from unredacted agent traces, moved laterally through internal SaaS accounts, and then wrote malicious builds straight into the marketplace's distribution cache. This article reconstructs the full attack chain, breaks down the payload's technical behavior (an SSH backdoor, host fingerprinting, and a reverse tunnel), maps the exact scope of impact, and gives individual users and enterprise teams practical investigation and hardening checklists they can apply directly.

    Introduction: The Real Breach Wasn’t in the Product, It Was in the Data and Credentials Around It

    The most alarming thing about a recent supply chain attack on an AI coding assistant extension was not that “a backdoor was hidden in a plugin.” It was that the attacker barely touched the editor’s core systems at all. Starting from a single leaked vendor key, they moved through an un-sanitized shared data bucket, used stolen credentials to enter several SaaS tools the vendor relied on, and finally pushed two tampered extension versions into the marketplace’s distribution cache.

    This case shatters a common misconception: the belief that a supply chain is safe as long as the core service boundary is solid. The reality is the opposite. The data exchange between an AI agent product and third-party model services, the way trace logs are retained, and how internal SaaS account permissions are managed can all become “perimeter gaps” around the core system. And those gaps ultimately converge in one place: the extension marketplace that developers see every day and tend to trust by default.

    Based on the vendor’s public security advisory and post-incident review, this article reconstructs the complete attack chain, analyzes the technical details of the malicious payload, and provides emergency investigation and hardening checklists that individual users and enterprise teams can act on directly.

    1. Establishing the Baseline: Verify the Facts Before Assessing Impact

    Before any analysis, here are the confirmed facts:

    • Versions: Two adjacent minor releases of an AI coding assistant extension, 2.1.312 and 2.1.313, had malicious code injected. The affected scope was limited to these two versions.
    • Platform: Only mainstream desktop operating systems were affected; other environments were not in scope.
    • Time window: The malicious versions went live on October 29, 2025, at 02:27 and were pulled around 13:35 that same day — a window of roughly 11 hours.
    • Potential number of affected users: Up to about 5,000 users may have installed the tampered versions.
    • Upstream is clean: These two versions were never released by the extension’s official upstream. The upstream product itself has no related vulnerability, and the malicious package never appeared in the public extension repository.
    • Payload behavior: Collect host fingerprints, write one of the attacker’s SSH public keys into the passwordless-login configuration, and attempt to establish a reverse tunnel.
    • Removal difficulty: The vendor explicitly warned that uninstalling the extension alone may not remove the threat, because the malicious code leaves behind a standalone persistent script that keeps running.

    From these facts, one key conclusion follows: the malicious versions did not leak from the upstream code repository. They were placed directly into the vendor’s own marketplace and its cache. The landing point of the attack was the distribution stage.

    2. Breaking Down the Attack Chain: Four Steps, Each on a Trust Boundary

    Step 1: A Leaked Vendor Key Turned a Read-Only Bucket into an Entry Point

    The vendor outsourced part of its inference and model-training workloads to a third-party inference provider and issued that provider an access key. The key was exposed on the provider’s side. Once the attacker obtained it, they directly read the read-only storage bucket shared between the two parties.

    This step exposes a typical risk in cross-organization data collaboration: read-only does not mean safe. Once a partner’s environment is compromised, the attacker gains a full read-only view of the collaboration data inside the bucket. The real problem here was not the bucket’s read/write permissions, but what was actually stored inside it.

    Step 2: Unsanitized Agent Traces Turned Logs into a Credential Store

    The bucket held coding-agent run traces from around 2025, captured from sessions where privacy mode was not enabled. A small fraction of these traces had not been fully cleaned and still contained real credentials. The number given in the vendor’s review: fewer than 0.01% of customer API credentials were exposed as a result.

    Why are trace logs so dangerous? When an agent executes tasks automatically, it often needs to read environment variables, invoke command-line tools, and access internal services. If the inputs and outputs of these operations are recorded in full, the following can land on disk verbatim:

    • tokens printed in debug output;
    • keys carried in command-line arguments;
    • request headers echoed back on authentication failures.

    Combined with cross-organization sharing and long-term retention, these “technical logs” effectively become a “credential store.”

    0.01% sounds negligible, but this number needs to be understood correctly. It is the proportion of the total volume of customer credentials. For a credential holder, whether you were hit is a matter of “yes” or “no.” For the attacker, even a small number of usable credentials is enough to pry open the next door.

    Step 3: Credential Lateral Movement — Even Non-Production Environments Have Entry Value

    Using the stolen credentials, the attacker entered several SaaS tools the vendor used and obtained parts of the source-code repositories in non-production environments, along with customer-support data and usage data. They then used credentials found there to push the malicious extension versions directly into the marketplace’s cache.

    Two details here are easy to overlook:

    • “Non-production” does not mean “low risk.” Test environments, internal tools, and support systems are often connected to core business systems, for example:

      • source-code repositories may contain release scripts and pipeline credentials;
      • customer-support and operations backends usually carry publish or takedown permissions;
      • usage data reveals customer scale and activity levels — intelligence that helps narrow down further attack targets.

      For the attacker, these “edge systems” are precisely the stepping stones toward the production distribution chain.

    • Credential permissions and login verification are the key defense line. This case exposes a classic risky combination: credentials that are valid long-term, blurry permission boundaries, and a lack of multi-factor authentication or login-environment checks — a single leaked key is enough to move through unhindered.

    Step 4: Poisoning the Distribution Cache for Precise Delivery to Endpoints

    Marketplace distribution usually relies on a cache: the client fetches the install package by extension identifier and version number, and cache nodes are responsible for delivering content to users quickly. The attacker bypassed the legitimate release process and wrote malicious versions straight into the cache. Clients then “normally” downloaded and installed these two versions.

    The cruelest part of the whole chain is this: every credential used at each step came from permissions the vendor had originally granted out as legitimate. The abused access included the vendor key, the partner’s shared-bucket access rights, and the SaaS accounts used daily by employees and collaborators. Not a single step required breaching the editor’s core services — yet every step advanced the attack.

    3. Why the Cache Became an Attack Surface: Distribution Is the Trust Root

    Many people assume a supply chain attack means “the upstream code was modified.” But this case shows that the distribution stage is itself an independent attack surface. There are three reasons:

    1. Trust is transmitted as a whole. Users trust the marketplace, the marketplace trusts its own release and caching system, and the client then unconditionally trusts whatever the marketplace returns. Poison any node on this chain, and the endpoint will accept it without question.
    2. The cache amplifies a single intrusion into a large-scale distribution. The point of a cache is to improve performance, but without full integrity and origin verification, it becomes an amplifier: the attacker only needs to write once, and every client that requests that version during the cache’s validity period will receive the same tampered content.
    3. What the victim faces is a “seemingly legitimate” version. The two version numbers sit right next to the normal releases, and the extension identifier was unchanged. If the client only checks “does this version number exist” instead of “was this content signed by the official source,” it simply cannot detect the anomaly.

    This leads to a general defense principle: integrity verification for the distribution channel cannot be built on “the cached content matches what was expected.” It must be built on cryptographic signatures and verifiable proof of origin.

    4. Payload Analysis: SSH Backdoor, Fingerprinting, and a Reverse Tunnel

    The payload in the tampered extension was not complex, but each part struck at a vital point of the developer’s machine.

    1. Host fingerprinting. The payload collected the hostname, username, OS version, the code-hosting platform account email, and the public egress IP. None of these is sensitive on its own, but combined they are enough to:

    • profile the developer’s identity and tech stack;
    • support targeted phishing later;
    • enable credential-stuffing correlation with other leaked data.

    2. Installing an SSH public key. The payload appended the attacker’s pre-prepared public key to the current user’s SSH passwordless-login configuration. From then on, this machine was “open” to anyone holding the corresponding private key.

    3. Establishing a reverse tunnel. The attacker usually cannot connect into a development machine protected by NAT or a firewall from the outside, so they leverage the victim host to initiate an outbound connection, “reversing” traffic back to a node the attacker controls.

    4. Leaving a standalone persistent script. The vendor’s review makes clear that the malicious code left behind a persistence component independent of the extension. This means that even after the extension is uninstalled or overwritten by an update, the backdoor can survive.

    The entire payload’s behavior can be summarized with the following pseudocode:

    1. Collect: hostname, username, OS version, code-hosting account email, public egress IP -> exfiltrate
    2. Persistence:
    3. if attacker's public key is NOT in the current user's authorized_keys:
    4. append(attacker's public key, comment="svc-telemetry") -> current user's authorized_keys
    5. drop a standalone persistent script / scheduled task and set it to auto-start on boot or on a timer
    6. Communication:
    7. start a reverse tunnel: the host initiates an outbound connection to an external node, establishing a remotely reachable channel

    The disguise detail is also worth noting: the attacker set the public key’s comment field to svc-telemetry. This field is meant to indicate a key’s purpose, but here it was used to masquerade as a legitimate key for a “telemetry service,” increasing the chance of it being overlooked during manual investigation.

    5. Scope of Impact: What Was Affected and What Wasn’t

    The vendor’s review drew a clear line around the scope of impact:

    Possibly affected:

    • Users who installed 2.1.312 or 2.1.313 during the window when the malicious versions were live, on mainstream desktop operating systems — up to about 5,000 people;
    • Some traces from sessions outside privacy mode and the small number of credentials left in them;
    • Some non-production source-code repositories, customer-support data, and usage data that were accessed.

    Not affected:

    • Prompts and code generated in privacy mode;
    • Customers’ own code repositories;
    • Inference requests that were in progress when the attack occurred;
    • The official client’s update channel.

    At the same time, the vendor confirmed that the attacker’s last known activity was on November 1 and has been blocked. But “activity blocked” does not mean “traces wiped clean.” The SSH public keys and persistent scripts planted on developers’ machines still need to be investigated one by one.

    6. Emergency Guide for Individual Users: 7 Steps to Investigate and Harden

    1. Verify the version and the time

    • Check the installed list in the extension management interface and confirm whether 2.1.312 or 2.1.313 ever appeared.
    • Compare against the window of October 29, 02:27 to 13:35, and recall whether you installed or updated the extension then. If automatic updates were enabled, it may have completed silently within that window.

    2. Preserve evidence first, then clean up

    Before you notice anything unusual, keep logs, process information, and network connection records first, then isolate and disconnect. Reinstalling immediately destroys evidence and works against attribution and notifying relevant parties. Note the order: preserve evidence first, disconnect second, clean up third.

    3. Focus on the SSH passwordless-login configuration

    This is the most critical checkpoint in this case. Check the authorized_keys file for your own account and other users on the machine. To avoid printing full public keys to the terminal or leaving them in logs, output only the key type and comment fields:

    1. # Current user as an example; replace with the corresponding user home directory for others
    2. awk '{print "line:", NR, "| type:", $1, "| comment:", $NF}' ~/.ssh/authorized_keys
    • If an entry with the comment svc-telemetry appears in the output, you can basically conclude that you are affected.
    • Also note whether the file’s modification time matches the incident window, and confirm that the permissions on the ~/.ssh directory and files are correct.
    • Beyond the main config file, also check any other paths pointed to by AuthorizedKeysFile in the SSH server configuration.
    • After finding a suspicious public key, do not just delete the file and call it done; move on to the compromise-handling procedure in step 7.

    4. Investigate persistent scripts and startup items

    Check scheduled tasks, user-level services or launch agents, each user’s shell startup files, and common temporary directories. Focus on:

    • executables or scripts created within the incident window;
    • suspicious paths pointing to temporary or home directories;
    • tasks that make periodic outbound network requests.
    1. # Scheduled tasks (user-level and system-level directories)
    2. crontab -l
    3. ls -l /etc/cron.d /etc/crontab
    4. # The user's shell startup files
    5. cat ~/.bashrc ~/.profile ~/.zshrc 2>/dev/null
    6. # Scripts modified in the home directory in the last three days
    7. find ~ -maxdepth 3 -type f \( -name '*.sh' -o -name '*.py' \) -mtime -3 2>/dev/null

    Auto-start mechanisms differ across operating systems. On graphical desktop systems, also check user-level startup items and login items newly added under application-support directories.

    5. Check for suspicious outbound connections and tunnel processes

    1. # Established TCP connections and their associated processes
    2. ss -tunap | grep ESTAB
    3. # Listening ports started by non-system users
    4. sudo lsof -i -P -n | grep LISTEN

    Focus on two signatures:

    • Periodic outbound connections: short connections to the same external address at fixed intervals are a classic tunnel or callback signature;
    • Suspicious local listening ports: the attacker may receive commands through a local forwarding port.

    6. Rotate credentials

    Regardless of whether a compromise is ultimately confirmed, it is recommended to rotate the API keys associated with this tool and to review the login records of your code-hosting platform and commonly used SaaS accounts, confirming there have been no logins from unfamiliar locations or newly added tokens. Specifically:

    1. revoke the old keys in the console;
    2. regenerate the keys;
    3. migrate the new keys to a dedicated key-management or credential-vaulting solution, no longer writing them in plaintext into config files or environment scripts.

    The vendor disclosed that a small number of customer credentials were exposed, and ordinary users have no way of knowing whether they are among them, so “rotate everything” is the lowest-cost, safest choice.

    7. Compromise handling

    Once you confirm the presence of anomalous public keys, unknown persistent processes, or unexplained outbound connections, treat the host as compromised:

    1. disconnect from the network immediately, but do not power off, so as to preserve volatile evidence;
    2. notify your team’s security lead;
    3. reinstall the system as soon as possible and restore data from a trusted backup;
    4. before restoring, confirm the backup was created before the intrusion;
    5. until a full reinstall is done, do not log in to any important accounts on this machine.

    7. Three-Layer Hardening Checklist: Constraining Supply Chain Risk at the Root

    Platform and Vendor Side

    1. Apply least privilege to the release pipeline: use short-lived credentials for releases, combined with multi-factor authentication and two-person review for publishing; separate build and release systems in terms of responsibility, and forbid long-lived high-privilege tokens from being shared across multiple parties.
    2. Artifact signing and provenance: generate a digital signature and verifiable provenance information for every official release, covering code source, build environment, and build steps. Enforce signature verification on the client before installation, and make cache and mirror nodes responsible only for forwarding — never for making trust decisions.
    3. Cache governance: periodically sample cached content and verify its consistency against the release-side signature manifest; on detecting any content or version anomaly, alert immediately and automatically invalidate the affected cache.
    4. Trace-log sanitization: have agent traces automatically identify and mask sensitive data such as credentials, tokens, and connection strings before writing to storage; enable least privilege, encryption, and access auditing on data buckets, and when sharing with external partners, prefer an “apply-on-demand, single-use authorization” model.
    5. Vendor key governance: host keys issued to external vendors in a key-management service, scope permissions by task granularity, rotate them regularly, and set anomaly alerts on call source and frequency.
    6. Release change monitoring: alert in real time on unexpected versions, publisher changes, and content-hash changes for the same version, shortening the window from poisoning to takedown.

    Individual Developer Side

    • Install extensions only from official channels, and keep an eye on marketplace advisories and reviews;
    • Enable code privacy mode to reduce trace-data retention;
    • Inject keys exclusively through a key-management or credential-vaulting solution, never writing them into source code or config files;
    • Monitor changes to security-sensitive files such as authorized_keys at the OS level, with the help of file-integrity monitoring tools;
    • Enable multi-factor authentication for commonly used accounts and periodically review active sessions.

    Enterprise Side

    1. Unified governance of extensions and artifacts: proxy external extensions through an internal artifact repository, establish an approval allowlist and version pinning, and forbid users from sideloading installs on their own.
    2. Identity governance: route internal SaaS through single sign-on with mandatory multi-factor authentication and follow least-privilege principles; rotate service-account credentials regularly and revoke access promptly for departing or contracted personnel.
    3. Egress traffic control: enforce allowlist controls on outbound destinations from development endpoints, and detect and alert on long-lived connections and tunnel traffic.
    4. Endpoint detection and response: deploy EDR-class capabilities and build detection rules for behaviors such as changes to authorized_keys, abnormal scheduled tasks, and suspicious process creation.
    5. Audit and observability: enable operation auditing and logging on key systems such as object storage, code hosting, and release pipelines, and configure monitoring alerts so that “who accessed what and when” is always traceable.

    Most of these capabilities can be realized with general cloud security product categories: access control and operation auditing for object storage, key-management services, identity and access management, logging and monitoring/alerting, and endpoint protection. Baidu AI Cloud, for example, offers these general product categories, which can be combined into a protection loop of “least privilege, end-to-end auditing, anomaly alerting,” helping teams turn a one-off incident response into a lasting mechanism.

    Conclusion: Turning “Implicit Trust” into “Explicit Verification”

    The most important takeaway from this case is this: the attacker did not need to break the system — they only needed to walk through the permissions the system had already granted out. From the vendor key to the shared data bucket, from the residual credentials in trace logs to the internal SaaS accounts, and finally to the marketplace’s distribution cache, every step happened where trust was taken for granted.

    There are two defense principles:

    • Treat data as credentials. Any log or trace that an agent might write, read, or send out should be assumed to potentially contain sensitive information, and should be sanitized before being written.
    • Treat distribution as a trust root. Every distribution of extensions, dependencies, and images must pass through signature and origin verification; a cache can only accelerate delivery — it cannot replace verification.

    For individual users, three things — verify the version, check authorized_keys, and rotate keys — are the most practical forms of self-protection in this incident.