Extension Cache Poisoning via Vendor Key Leak: A Supply Chain Forensics Analysis
This article analyzes a supply chain security incident in which a leaked vendor access key led to the poisoning of an AI coding assistant extension cache. It reconstructs the six-step attack chain—from a read-only storage bucket to a persistent backdoor—explains how to properly assess impact across layered metrics (distribution, installation, execution, callback, persistence, and data exposure), and provides detection and response guidance covering credential governance, session data sanitization, artifact signing, cache integrity, and endpoint monitoring. The incident is classified as a compound "vendor-side key leak → data residue → cache poisoning" event rather than a single product vulnerability.
1. The Nature of the Incident: Not an Upstream Product Vulnerability, but a Broken Supply Chain Trust Boundary
A security incident disclosed by an AI coding tool vendor shows that the entry point did not come from the coding assistant itself, but from an access key leaked on the vendor side. The key was issued by the tool vendor to a third-party service provider and held only read-only permissions on a shared storage bucket. Many teams tend to treat “read-only” as low risk, but in supply chain scenarios, read-only data—once it contains session traces, configuration fragments, environment variable names, debug logs, or residual credentials—is enough to serve as a springboard for lateral movement.
The core conclusion of this forensic analysis is that the attacker used the leaked key to read historical code agent run traces stored in the shared bucket, extracted uncleaned credential information from some records, used those credentials to access certain software services operated by the tool vendor, and ultimately uploaded a tampered coding assistant extension package to the extension distribution cache. It is important to emphasize that the malicious package was not published by the upstream coding assistant provider, the upstream product itself contains no vulnerability, and the public extension marketplace never hosted the malware. This corrects earlier reports that attributed the malicious package to the upstream publisher or mistakenly placed it on the public extension marketplace. The incident is therefore best classified as a compound supply chain event—“vendor-side key leak → data residue → cache poisoning”—rather than a single-product vulnerability.
2. Attack Chain Reconstruction: Six Steps from a Read-Only Bucket to a Backdoored Extension
2.1 Vendor Key Leak: Underestimated Read-Only Permissions
The starting point was an access key issued by the tool vendor to a third-party supplier, with read-only access to a shared storage bucket. The attacker could not modify objects but could enumerate and download them. The risk of read-only access lies in what can be read, not what can be written: if the bucket held a small number of code agent run traces—mostly generated during a particular year and originating from non-privacy-mode sessions—that data may originally have been intended for model training or effectiveness analysis. The issue is not whether training was permitted, but whether credentials were sanitized before the data entered shared storage.
2.2 Residual Credentials in Historical Sessions as a Secondary Credential Source
Some run traces retained uncleaned credential material. When a code agent operates in a real development environment, it may encounter environment variables, temporary tokens, debug output, configuration fragments, package manager authentication details, and CI variable names. If log collection, session archiving, and object storage lack a unified sanitization and scanning pipeline, credentials persist long-term as “historical data.” Using these residual credentials, the attacker accessed certain software services used by the tool vendor. The exposed scope included archived non-production source code repositories, a small number of customer support records and emails, usage metrics, contact information, conversation summaries, and credentials that some users had sent to customer support.
2.3 Lateral Movement Using Internal Data to Harvest More Credentials
A vendor-side data leak does not necessarily lead directly to artifact poisoning; there is typically an intermediate lateral movement phase. The attacker continued searching historical records and internal data for usable credentials, gradually expanding access. The key risk at this stage is treating “non-production,” “archived data,” and “support records” as low-sensitivity assets. In reality, non-production source code can expose internal architecture, service naming, and call relationships; support records may contain tokens or screenshots voluntarily submitted by users; usage metrics and contact details can feed social engineering or follow-on attacks. Security boundaries should not be drawn along production/non-production lines, but along “does it contain identity credentials” and “can it trigger downstream operations.”
2.4 Cache Poisoning: A Malicious Build Enters the Distribution Pipeline
Within a window of roughly eleven hours, the attacker used a credential obtained from the leaked internal data to upload the tampered extension package directly to the extension distribution cache. At most five thousand users who requested the specific cached version may have received the malicious build. The affected artifacts were two adjacent patch versions of the coding assistant extension, covering two major desktop operating systems. “Potential distribution scale” does not equal “actual infection scale”: five thousand users may have requested the malicious version, but only devices that completed installation, loaded and executed the code, successfully connected out, and established persistence constitute actual backdoor connections.
2.5 The Backdoor Executes on Load—No User Conversation Required
Preliminary technical analysis shows the malicious package injected script code that executes automatically when the extension loads, without requiring the user to initiate an AI conversation. The code collects host information, adds an SSH authorized key named svc-telemetry, and attempts to establish a reverse SSH tunnel to an externally controlled address. The initially uploaded data contained only environment variable names, not values—a design that lowers the chance of detection by simple content inspection while demonstrating the attacker’s capability for staged information collection. Further analysis shows the malicious code achieves persistence through a system-level autostart mechanism on one desktop OS family and a corresponding persistence method on the other.
2.6 Persistence Combined with Callback: From One-Off Risk to Long-Term Compromise
The combination of execute-on-load, authorized key injection, reverse tunneling, and autostart configuration means the risk is not a one-time code execution. Even if the malicious extension is later uninstalled, the written authorized key and autostart entries may retain access. Incident response therefore cannot stop at cleaning the extension directory; it must also audit authorized keys, autostart items, scheduled tasks, process trees, outbound connections, and DNS resolution records. For developer endpoints, reverse tunnels are especially dangerous because they can bypass inbound defenses by establishing a control channel over outbound connections.
3. Impact Assessment: Distinguish Distribution, Installation, Execution, Callback, and Persistence
Disclosed figures show that fewer than 0.05% of users had code agent run traces exposed, and fewer than 0.01% of customers had API credentials exposed. These figures correspond to different scopes of impact and must not be equated with the number of users who installed the malware. At most five thousand users requesting the specific cached version may have received the malicious build—but that is potential distribution scale, not five thousand devices with established backdoor connections. A sound impact assessment should use layered metrics:
- Distribution layer: how many clients requested the affected cached version;
- Installation layer: how many devices actually installed or updated to the malicious build;
- Execution layer: how many devices triggered the injected script upon extension load;
- Callback layer: how many devices successfully connected to the external address;
- Persistence layer: how many devices had authorized keys or autostart entries written;
- Data exposure layer: how many session traces or API credentials are at risk of exposure.
Only by counting these layers separately can organizations avoid misreporting “potentially received” as “already infected,” and provide accurate grounds for notification, isolation, rotation, and forensics.
4. Detection and Response Recommendations: From Credential Governance to Cache Integrity
4.1 Least Privilege and Lifecycle Governance for Vendor Keys
Vendor access keys should follow the principles of least privilege, short validity, auditability, and rotatability. Read-only permissions should be further narrowed by object prefix, data classification, and purpose. Shared storage buckets should have access logging, anomalous download alerting, and bulk enumeration detection enabled. Key issuers should retain purpose labels, accountable owners, and expiration times to avoid “issue once, valid forever.”
4.2 Sanitization and Scanning Before Historical Session Data Goes Live
Code agent sessions, debug logs, and run traces should undergo sensitive information scanning before entering buckets, data lakes, or training datasets. A combination of rule matching and entropy detection can scan for API keys, tokens, private keys, connection strings, and authorization headers. Example pseudocode:
import rePATTERNS = [r"(?i)api[_-]?key\s*[:=]",r"(?i)token\s*[:=]",r"(?i)secret\s*[:=]",r"(?i)authorization\s*[:=]",]def scan_text(text):findings = []for pattern in PATTERNS:for match in re.finditer(pattern, text):findings.append({"pattern": pattern,"offset": match.start(),})return findings
Scan results should feed a blocking workflow: objects matching high-risk rules must not enter shared storage, and existing historical objects should be rescanned in bulk, flagged, sanitized, or deleted. For session data that cannot be sanitized, only statistical features should be retained—not raw text.
4.3 Artifact Signing, Hash Verification, and Cache Consistency
Extension distribution caches should enforce artifact signing, hash whitelisting, and release approval. Clients should verify the signature and expected digest before loading, and the cache layer should guarantee consistency across “publisher signature → cached object → client download.” Example verification logic:
import hashlibdef verify_artifact(artifact_bytes, expected_digest, signature_valid):actual_digest = hashlib.sha256(artifact_bytes).hexdigest()if actual_digest != expected_digest:return Falseif not signature_valid:return Falsereturn True
In cache poisoning incidents, attackers typically exploit the gap that “cached objects can be written with internal credentials.” Cache write credentials should therefore be separated from release system credentials; cache refreshes and version overwrites should require dual approval; and an immutable release audit log should be maintained. Upon discovering an anomalous version, the system should support version freezing, cache purging, client rollback, and forced re-verification.
4.4 Endpoint Detection of Abnormal Tunnels, Authorized Keys, and Autostart Items
Against backdoors that execute on load, add authorized keys, establish reverse tunnels, and persist, endpoint detection should cover the following signals: newly added authorized keys, anomalous outbound connections, unexpected autostart entries, child processes spawned immediately after extension load, environment variable enumeration, and connections to multiple addresses within a short window. Pseudocode for authorized key auditing:
def detect_new_authorized_keys(baseline_keys, current_keys):baseline_set = set(baseline_keys)current_set = set(current_keys)added = current_set - baseline_setremoved = baseline_set - current_setreturn {"added": list(added),"removed": list(removed),}
For developer endpoints, monitoring should also cover extension directory changes, cache directory writes, system autostart configuration changes, and outbound connection destinations. When anomalies are found, isolate the endpoint, rotate API credentials, revoke suspicious authorized keys, remove autostart entries, and preserve evidence of memory, processes, network connections, and file changes.
4.5 Vendor Onboarding and Contractual Security Clauses
Supply chain security cannot rely on technical detection alone. Vendor onboarding should assess key management, data sanitization, log retention, incident notification, and subprocessor management capabilities. Contracts should specify security incident notification timelines, forensic cooperation, data deletion, credential rotation, and audit rights. For cross-boundary data flows—shared storage buckets, cache publishing, support systems—data flow diagrams should be drawn with every point where credentials may appear clearly marked.
5. Long-Term Governance: Treat “Read-Only Data” as a High-Sensitivity Asset
The lessons of this incident can be summarized in three points. First, read-only permission does not equal low risk—historical sessions and archived data can contain high-value credentials. Second, supply chain attacks often do not target the core product directly, but instead strike “trust edges” such as caches, builds, distribution channels, and vendor keys. Third, impact assessment must be layered—potential distribution volume cannot substitute for actual infection volume.
Long-term governance should bring object storage, log services, monitoring and alerting, artifact repositories, and extension distribution caches under a unified supply chain security system: classify and grade data with pre-release sanitization; enforce least privilege and short-term rotation for keys; apply signing, hash verification, and release auditing to artifacts; monitor endpoints for abnormal tunnels, authorized keys, and autostart items; and conduct vendor onboarding assessments and incident drills. Only by making the entire chain—“data residue → credential leak → cache poisoning → persistent backdoor”—observable and blockable can organizations quickly locate, accurately assess, and reduce the spread of the next similar incident.
