The New Insider: What a Backdoored Extension and a Pentagon Leak Reveal About AI Coding Agents
Two incidents this week, a tampered Claude Code extension in Cursor's marketplace and a reported Pentagon leak via a contractor's personal agent, show the real risk of coding agents is what they can touch. Here is what happened and how businesses should respond.
For most of the short history of AI coding assistants, the security worry was simple: what if the AI writes bad code? A model might suggest an insecure function, invent a package that does not exist, or miss an obvious bug. Those risks are real, but two incidents reported this week point to a different and arguably bigger problem. The danger is no longer only what a coding agent writes. It is what a coding agent is allowed to touch, and whether the agent you are running is the one you think it is.
In the first case, a tampered copy of a popular coding-agent extension was served to developers for several hours through an editor's extension marketplace and tried to plant a remote-access backdoor on their machines. In the second, WIRED reported that a contractor allegedly connected a sensitive US Department of Defense system to a personal AI coding agent, which then ran there for about two months. One is an attack and the other, if the reporting is accurate, is a lapse in judgement. But they share a root cause, and it is one every business using AI agents should understand.
This article looks at what happened in each case, using only what the companies involved and the reporting have said publicly, and then sets out what the two incidents together suggest about how to run coding agents safely.
Incident one: a trusted name in a trusted marketplace
On 29 October 2026, Cursor published a security notice saying that a maliciously modified version of Anthropic's Claude Code extension, versions 2.1.312 and 2.1.313 for Windows and macOS, had been available in the Cursor VS Code Extension Marketplace. According to Cursor, the bad versions were live from about 2:27am to 1:35pm Pacific time that day, roughly eleven hours. Cursor stated that these versions were not developed by Anthropic.
Microsoft Threat Intelligence published its own analysis the following day. It said it had confirmed that the malicious packages were never published or distributed through Microsoft's Visual Studio Marketplace or through Anthropic's official npm package, that Anthropic had confirmed its own systems were not compromised, and that all evidence suggested the incident was limited to Cursor's marketplace.
What the payload tried to do
Both Cursor and Microsoft describe the same broad behaviour. Code injected into the extension ran as soon as the extension loaded, before its normal start-up, and attempted to:
- Collect information about the machine and its user, including the hostname, username, operating system, home directory, the names of environment variables, working folders, the configured Git email and the public IP address.
- Add an attacker-controlled SSH key, labelled
svc-telemetry, to the user's list of authorised keys, which would let whoever held the matching private key log in. - Switch on the local SSH service and open a "reverse" SSH tunnel, an outbound connection from the victim's machine to the attacker's server that would let the attacker reach back in.
- Make that tunnel persistent, using a LaunchAgent on macOS or a scheduled task (with a start-up script as a fallback) on Windows, retrying roughly every 60 seconds.
Microsoft's write-up explains why the reverse tunnel design is clever from an attacker's point of view. Instead of waiting for an inbound connection, which firewalls often block, the victim's own machine reaches out and offers a doorway back in. The loader also disabled normal host-key checking and avoided any interactive prompts that might have alerted the user.
Why the damage was limited, and why that is not the end of it
Cursor says that turning on the local SSH service needs administrator rights, which the extension did not have on most macOS and Windows machines, and that errors in the malicious code meant this step would fail outside unusual cases where Cursor was started with admin privileges. On those machines, Cursor says, the attacker could not have logged in through the tunnel. Cursor also says it worked with the hosting provider to take the attacker's server offline, removed the malicious versions, shut down and rebuilt the marketplace, rotated its keys and audited access, finding no other tampered extensions.
Even so, both companies stress that affected users should not assume they are safe. The extension still added the attacker's key, installed persistence and tried to send host details. Cursor warns that uninstalling the extension may not be enough, because the payload drops standalone scripts that keep running, and advises rotating credentials and sessions reachable from an affected machine, from a different, trusted computer.
The details of who tampered with the package, and how, have not been made public in the sources we reviewed. What matters for this analysis is the shape of the attack: it did not need to trick the AI model at all. It went after the software wrapper that people install to use the model, borrowing the trust attached to a well-known name.
Incident two: an agent given the keys
The second story is very different. On 29 October, WIRED reported, citing sources, that earlier this year a contractor employed by the consulting firm Accenture caused a security incident at the Department of Defense by connecting a secure, centralised system used by several intelligence agencies to their personal Claude Code account.
According to WIRED's sources, the contractor wanted to automate writing code and spinning up cloud servers, and so gave the agent their login credentials. That reportedly gave the agent administrative access and let it bypass security controls that the normal login process enforces. The agent was not only writing code but committing it into the system on the contractor's behalf. To do its work it needed to reach the internet, and in doing so it appears to have sent the contractor's login credentials, passwords and a map of the network to a third-party website.
WIRED reports that the system holds controlled unclassified information (CUI), sensitive material that is not meant to be released without review, and runs on NIPRNet, the Defense Department's network for unclassified information. WIRED says the agent ran on the network for two months before it was identified and the gap was closed. It declined to name the third-party site, but said the US National Institute of Standards and Technology had previously flagged it as high risk because of a flaw that could let attackers inject instructions into an AI coding agent to steal credentials.
It is important to be clear about what is and is not established. Accenture told WIRED that the allegations "were thoroughly and independently investigated and found to be without merit" and that it "fully complied with our legal and contractual obligations". WIRED notes that, when pressed, Accenture did not say who carried out the investigation or dispute that there had been what could be called an incident. The Department of Defense declined to comment on its networks. The reporting does not establish that anyone actually exploited the leaked information. So this is a disputed, source-based account, not a confirmed breach report.
Even taken with that caution, the scenario it describes is instructive, because nothing in it requires a sophisticated attacker. It requires only an agent with too much access, a connection to the outside world, and a person who trusted it to get on with the job.
The common thread: agents inherit everything you give them
At first glance the two incidents look unrelated. One is a supply-chain attack on a software marketplace; the other is an alleged policy failure inside a government network. But look at what made each one dangerous and the same three ingredients appear.
1. Broad, ambient access
A coding agent, or the extension that hosts it, runs with the same permissions as the developer who launched it. It can usually read the files in the project, see environment variables, run terminal commands and reach the network. The tampered extension did not need to break out of anything; it simply used the access any extension in that position already has. In the WIRED account, the contractor went further and handed over login credentials, which reportedly gave the agent administrative reach that skipped the usual checks.
2. A path to the outside world
In both stories the harm depends on data leaving the machine or network: host details posted to an attacker's server in one case, credentials and a network map sent to a third-party website in the other. Agents are useful precisely because they can fetch documentation, install packages and call APIs. That same outbound reach is what turns a mistake or a compromise into a leak.
3. Trust attached to a name
The malicious extension worked because it looked like a well-known, legitimate product in a marketplace that developers rely on. The DoD scenario turns on a person trusting a capable commercial agent enough to let it act with their own identity. In both, trust in the brand of the tool stood in for checks on what the tool was actually doing.
None of this is unique to one company's model or one editor. Any agent that runs code, any extension that hosts one, and any person who connects one to sensitive systems faces the same three risks. The model's intelligence is almost beside the point. A perfectly behaved model inside a tampered wrapper is still a backdoor, and a well-meaning agent with administrator credentials and open internet access is still a leak waiting to happen if anything along its path can be manipulated.
What this means for businesses using coding agents
The practical lessons are not exotic. Most of them are old security principles applied to a new kind of tool. Here is how they map on to the two incidents.
Treat agent tooling as part of your software supply chain
Extensions, plugins and command-line tools that host AI agents should get the same scrutiny as any other dependency. That means knowing which ones are installed across the organisation, where they were downloaded from, and which versions are running. The Cursor incident affected only one marketplace and specific versions over a specific window, which is exactly the kind of question a team can only answer quickly if it already keeps an inventory. Pinning versions and delaying automatic updates for critical tools, so a brand-new release is not pulled onto every machine within minutes, can also narrow the window in which a tampered release does harm.
Never hand an agent your own credentials
The single most damaging step in the WIRED account is the contractor reportedly giving the agent their login credentials. Agents should work with their own, separate, narrowly scoped identities: tokens that can do only what the task needs, expire quickly, and can be revoked without locking out a human. If an agent needs to deploy code, give it a deployment role, not an administrator's password.
Control where agents can connect
Because the harm in both stories depends on data leaving, outbound network controls matter as much as inbound ones. Running agents in sandboxes or containers with an allow-list of approved destinations, such as your package registry and source-control host, makes it much harder for a compromised extension or a manipulated agent to send secrets somewhere else. Keep agents that touch sensitive data on networks where unknown outbound traffic is blocked and logged.
Separate personal and work accounts
The WIRED report centres on a personal AI account connected to a work system. Organisations need a clear policy on which AI tools are approved, under which accounts, and for which data, and they need to make the approved route easy enough that staff are not tempted to improvise. A ban that people quietly work around protects no one.
Assume compromise and plan clean-up
Cursor's guidance that uninstalling may not remove the threat is a useful reminder: when an agent or its wrapper is compromised, the response looks like any other malware incident. Check for unknown SSH keys and persistence entries, isolate affected machines, consider rebuilding them, and rotate every credential that could have been reached, from a trusted device. Speed matters too. WIRED's sources say federal contractors must report cyber incidents within 72 hours, and that Accenture did not initially report this one, a claim the company's statement does not directly address.
Where this leaves us
AI coding agents are becoming genuinely capable colleagues. They can write, test and ship code faster than many teams could a year ago, and that is why people are giving them more access. This week's two stories are a reminder that capability and safety are separate questions. The more an agent can do, the more it matters exactly what it is allowed to do, what it can reach, and whether the copy you are running is genuine.
The good news is that the defences are well understood: least-privilege identities, controlled network access, a managed supply chain and a tested incident plan. The hard part is applying them consistently to a category of tool that often arrives on a developer's laptop as a one-click install. For businesses adopting agents now, the safest assumption is simple. Treat every AI agent like a new contractor with a powerful laptop: helpful, fast, and never given more keys than the job needs.
Sources
- Cursor: Security notice, malicious version of Anthropic.claude-code (2.1.312 and 2.1.313)cursor.com
- Microsoft Security Blog: Inside a malicious Claude Code-branded extension and its persistent SSH backdoormicrosoft.com
- WIRED: A Defense Contractor Gave Their Personal AI Agent Access to a Secure Pentagon Systemwired.com
- The Next Web: A Claude agent ran inside a Pentagon network for two months, WIRED reportsthenextweb.com