AIDEFEND in Action AIA-0178 Incident

MaliciousCorgi: Working AI Coding Extensions on the VS Code Marketplace Uploaded Every File Developers Opened

Two VS Code extensions worked as AI coding assistants. According to reporting on Koi Security's analysis, they also uploaded files developers opened and could send more files on request. Microsoft removed both from its Marketplace on February 17, 2026, listing them as untrustworthy. The number of developers whose files were sent is unknown.

Data ExfiltrationMalicious PackagesPackage VettingExtension SecurityAI Supply Chain
4 applicable AIDEFEND defenses
Source: Malicious AI extensions on VSCode Marketplace steal developer data 
Author: Bill Toulas (BleepingComputer)
Original article: Jan 23, 2026

Threat Analysis

  • An AI assistant that really worked. Visual Studio Code (VS Code) is Microsoft's widely used code editor, and the Visual Studio Marketplace is the official store from which it installs extensions, add-ons that run inside the editor. Two extensions listed there as AI coding assistants, a Chinese-language ChatGPT extension (ID whensunset.chatgpt-china, about 1.34 million installs) and ChatGPT - ChatMoss (CodeMoss) (ID zhukunpeng.chat-moss, about 151,000), delivered autocomplete and explanations of coding errors as advertised. Koi Security, which named the campaign MaliciousCorgi, found the same data-collection code and the same backend servers in both, under two different publisher names.
  • Opening a file was enough. According to Koi's findings as reported by BleepingComputer, the moment a developer opened a file, with no other interaction, the extension read the entire file, encoded it in Base64 and handed it to a webview (a web page the extension displays inside the editor) that contained a hidden tracking iframe. The Hacker News reports that the contents went to a server in China, aihao123[.]cn, and that the upload repeated with every edit. Neither extension disclosed the upload or asked for consent.
  • Two more collection routes. The server could also issue a command that made the extension send up to 50 files from the developer's workspace at once, a collection triggered by the server rather than by the developer opening a file. Separately, a zero-pixel iframe in the webview loaded four commercial analytics SDKs from China, Zhuge.io, GrowingIO, TalkingData and Baidu Analytics, which Koi says track user behavior, build identity profiles, fingerprint the device and monitor activity in the editor. Koi warns that the exposed data can include private source code, configuration files, cloud credentials and .env files holding API keys.
  • Why ordinary checks did not catch it. An AI coding assistant has to read the code a developer is working on to suggest anything, so these reads look like normal behavior, and VS Code runs extensions with the same permissions as the editor itself. The issue was not what the extension could read, but where it sent the data. The publishers were malicious from the start, which sets this case apart from a legitimate extension altered with stolen publishing credentials: a check that a package came unaltered from its publisher cannot tell whether the publisher deserves trust.
  • What is known about the outcome. Microsoft told BleepingComputer on 24 January 2026 that it was investigating the report, and its public list of removed Marketplace extensions shows both removed on 17 February 2026 with the label Untrustworthy. The same list shows two more extensions from publisher zhukunpeng, zhukunpeng.vscode-tinypng-pro and zhukunpeng.codemoss, removed with the same label on 26 and 27 February; no source links them to this campaign. Install counts do not show how many developers had files sent, which files the server collected or what the operator did with the data, and public sources do not say whether VS Code removed copies already installed. Koi's original write-up is no longer reachable at its former address, so these details come from the reporting cited here.

Applicable AIDEFEND Defenses (4)

AID-H-028.006
Client Distribution, Plugin & Update Integrity Verification
Very High
On managed developer machines, let VS Code load only extensions whose publisher, ID and version are on a reviewed list, enforced through the AllowedExtensions device policy, and compare what is actually installed against that list. Neither WhenSunset nor zhukunpeng would be on it unless someone approved them, so the extension never activates and none of the three collection mechanisms runs; VS Code also disables an installed extension once it is blocked. The gate holds only while approval includes checking the publisher and where an extension sends data. VS Code's rules match identifiers, not package bytes, and machines outside device management are not covered.
AID-I-002.002
Secure External AI Service Connectivity
High
Route outbound traffic from developer machines, or from the managed development environments where the AI assistant runs, through a proxy or firewall that allows only approved destinations by DNS name and TLS SNI and blocks the rest. aihao123[.]cn and the four analytics services would not be on the list, so the file uploads, the bulk collection and the SDK loads fail even with the extension installed. Two limits apply. If the extension's AI features also depend on its operator's own server, approving that server to make the assistant work would open the upload route too, and the sources do not say whether the AI requests and the uploads share a domain. Most developer workstations also need broad internet access, so a strict list is easier to enforce in managed or virtual development environments.
AID-E-003.003
Confirmed Malicious Code & Persistence Eviction
High
Once the extensions are confirmed as malicious, keep a copy of each installed package as evidence, remove whensunset.chatgpt-china and zhukunpeng.chat-moss from every developer machine and from any internal extension mirror or shared VSIX folder, and add both IDs to the blocked side of the extension policy so they cannot be reinstalled. Then check the full fleet inventory, not a sample. Microsoft's removal from the Marketplace stops new installs, but public sources do not say whether VS Code uninstalled existing copies, so the check has to be done on the machines. This stops further collection; it does not retrieve files already sent.
AID-E-001.001
Root & Long-Lived Credential Object Eviction
High
Treat any secret stored in a file that was opened while the extension was installed, such as an API key in a .env file or a cloud credential in a configuration file, as part of the uploaded contents; the server-triggered collection could also have taken other workspace files. For each affected machine, list the secrets kept in the workspaces used during that period, revoke or disable each one at the service that issued it, issue a replacement only where it is still needed, and confirm the old value is refused. Revocation stops reuse of those secrets. It cannot recall source code already sent, and any short-lived tokens or sessions found in the same files need separate invalidation.

What Defenders Should Do Now

  • Check every developer machine for the two extension IDs. Look for whensunset.chatgpt-china and zhukunpeng.chat-moss in the installed extensions (for example with code --list-extensions or your endpoint inventory), and review any other extension from the publishers WhenSunset and zhukunpeng. If one is present, keep a copy for the investigation, uninstall it and block both IDs so they cannot come back. Do not assume the Marketplace removal cleaned up existing installs.
  • Treat secrets from that period as exposed. For each affected machine, establish when the extension was installed and which workspaces were opened in that time. Revoke and replace the API keys, cloud credentials and other secrets kept in those workspaces' files, then confirm each old value is refused.
  • Search your egress logs for the destinations. Look in proxy, DNS and firewall logs for connections to aihao123[.]cn, and for analytics traffic from the editor to Zhuge.io, GrowingIO, TalkingData or Baidu Analytics, to find which machines sent data and when. A match confirms that traffic left the machine; it does not show which files were in it.
  • Allow only reviewed extensions on managed machines. Deploy VS Code's AllowedExtensions policy with a list of approved publishers and extensions, then test it: installing an extension from an unlisted publisher must fail, and a blocked extension that is already installed must be disabled. Before adding an AI assistant to the list, run it in a disposable environment, open a test file and check every destination it connects to.
  • Restrict where development machines can send data. Where possible, route outbound traffic from developer machines or managed development environments through a proxy that allows only approved destinations, and confirm from a test machine that an unapproved domain is refused.

1 additional consideration

Keep live secrets out of files the editor opens

Every collection mechanism in this case works on files in the workspace. Secrets kept in .env and configuration files inside a project are exposed to any extension that reads the files a developer opens, malicious or not.
Recommendation: Development teams can load credentials at run time from a secrets manager or the operating system's credential store (for example macOS Keychain or Windows Credential Manager) instead of storing them in project files, use short-lived credentials for local development, and run secret scanning on repositories and developer machines to find secrets that remain in files. This narrows what an extension that reads workspace files can take. It does not protect source code, and a secret that a tool loads into memory or the environment is outside this safeguard.

Conclusion

An AI assistant needs access to your code to help you write it. On managed devices, AIDEFEND  points to enforcing a reviewed extension list and restricting where extensions can send data. If either extension was active, remove it and revoke any credentials that may have been exposed.

Last updated: