2026 Was the Pilot. 2027 is When AI Coding Agent Attacks Scale.
0 분 읽기

Mayur Sewani
Note: This is post #2 of Forcepoint’s 2027 Future Insights series, providing predictions and analysis of developing shifts in the cybersecurity landscape.
###
Something new slipped into the software supply chain in 2026: the AI coding agent. It reads text it has no reason to trust, then acts on it through the developer’s own access. That means an attacker doesn’t have to break into a user’s laptop. They only have to plant something the agent will believe.
None of this is theoretical anymore. Researchers spent 2026 finding weak spots in agent project files, MCP configurations, skills and repositories. In this post, we line that research up on a single attack chain, then say what we think comes next in 2027.
In 2027, attackers will shift from hacking developers to feeding instructions directly to the AI agents those developers rely on.
The 2026 Baseline: From a Poisoned File to Downstream Victims
At the heart of it is indirect prompt injection that reaches an agent with real tools. After the first step, everything looks like a normal day for a developer. That is exactly why it is so hard to catch.

Fig. 1: The attack chain with three 2026 findings laid over it. Each tag shows which attacks touch that stage. The attacker starts at stage 1, and the damage lands on people who never opened the poisoned file.
What One Injected Instruction Can Reach
A chatbot can only talk. A coding agent like Cursor, Claude Code, GitHub Copilot or Codex can act, and it acts from inside a developer’s trusted environment.
One injected instruction can end up reaching:
- Repository files
- Git history and remotes
- Terminal and shell
- Package managers
- Environment variables
- MCP tools
- Cloud credentials
- GitHub and GitLab
- CI/CD systems
- Databases
- The developer filesystem
Three 2026 Incidents Validate the Pattern
In three public investigations from 2026, attackers abused something the developer or the agent already trusted.
1) Malicious agent skills
February 2026 | Chain stages 2-5
- Snyk checked 3,984 ClawHub skills: 76 were confirmed malicious and 13.4% had a critical flaw.
- The malicious ones hid steps in base64 and ZIP files to steal credentials, and 91% added prompt injection too.
- Reference: Snyk, ToxicSkills
2) TeamPCP cascade through the AI toolchain
March 19-27, 2026 | Chain stages 2, 3, 6 and 7
- A poisoned Trivy leaked LiteLLM’s PyPI token, and versions 1.82.7 and 1.82.8 went out stealing keys.
- A file called
litellm_init.pthran every time Python started, and the loot left astpcp.tar.gz. - Reference: Forcepoint X-Labs
3) Fake leaked-source repositories
March 31-April 1, 2026 | Chain stages 1-3
- A fake “leaked Claude Code” repo climbed high in search results.
- The download held a Rust dropper that installed the Vidar v18.7 infostealer and GhostSocks.
- Reference: Zscaler ThreatLabz
Five Trends That Will Scale This in 2027
Five broad trends all point in the same direction.
Trend | Why it matters |
|---|---|
| 1- Fast-growing ecosystems | Marketplaces for agent skills, tools and plugins are growing fast and get very little vetting, which leaves plenty of room for bad listings. |
| 2- A large, exposed surface | A lot of agent setups are loosely configured, with unpinned tools and wide pre-approved permissions that attackers can lean on. |
| 3- Attackers automate | Churning out look-alike listings and republishing them under new names costs almost nothing, and the tooling keeps getting better. |
| 4- Fast, reusable lures | Attackers jump on AI news within a day and reuse the same delivery tricks, so every new headline is an opening. |
| 5- Concentrated rewards | AI development tools keep many keys and tokens in one place, so they will keep getting targeted. |
Put those together and we expect more of these attacks in 2027: more targets, attackers who automate and move fast and a big payoff in AI tooling. Most will show up in part (a lure, poisoned content, stolen credentials) rather than as a full seven-step chain.
The 2027 Attack Chain: Techniques at Every Stage
Same chain, new tricks. The highlighted boxes are what we think attackers will add in 2027, and the starred ones are the techniques we think are most promising for them. The faded boxes are 2026 techniques, shown for context.

Fig. 2: Predicted attacker techniques at each stage in 2027. From our perspective, a technique is most promising when it is cheap to scale, when it blends into a developer’s normal workflow and when it bypasses checks done at time of installation.
A Theoretical Attack, Stage by Stage
Here is one theoretical scenario that follows Figure 2 from left to right. Each step shows the starred technique it demonstrates, another 2027 technique that fits the same stage (dashed) and a short example. The company is fictional and unnamed, and we’ve kept the story deliberately high level: no payloads, commands or working exploit code.

Fig. 3: The example at a glance. The dashed line shows the skill from step 1 getting pulled in again at step 4.
Step 1: Lure ★ Skill typosquatting
Example: An attacker carries out skill typosquatting: they publish an agent skill whose name is one character off from a popular code-review skill, and push it around the time of a new model release. It looks useful and has a polished description. The targets are developers at a fintech company and anyone else who uses a widely adopted open-source library.
Step 2: Poisoned artifacts ★ Poisoned rules and agent instruction files
Example: A friendly pull request adds an agent instruction file to that library, and the same PR goes out to dozens of other repositories. To a person it reads like contributor guidance. It also holds directions meant for AI agents, including a nudge to install the typosquatted skill from step 1 as the “recommended” review skill.
Step 3: Developer opens ★ Zero-click project config loading
Example: A developer at the fintech opens the library’s repository while debugging. Their coding agent loads the project’s config as soon as it opens, with no prompt and nothing to click. The trust prompts they have clicked through many times before wouldn’t have stopped it anyway.
Step 4: Agent reads context ★ Tool output as second-stage injection
Example: Following the instruction file, the agent installs and runs the typosquatted skill, which tells it to fetch a documentation page with its web tool. The page carries a second set of instructions, and so does a comment hidden in an issue thread. Both arrive through channels the agent trusts, so they skip the scrutiny the first file got.
Step 5: Agent acts ★ Slow drip across calls
Example: Over a long session the agent takes several small steps: it reads a config, fetches a “helper” archive, runs a package script and writes a file. Each one looks routine and reuses commands already on the developer’s allowlist, so no single action triggers an approval prompt.
Step 6: Compromise ★ Model-key harvest from AI gateways and SDKs
Example: Those steps gather model API keys, cloud tokens and the developer’s package-publishing token from the environment and the AI gateway settings, then send them out in small pieces that blend into normal traffic. At the same time, a dependency version and a CI workflow in the company’s own SDK repository are quietly edited.
Step 7: Downstream ★ Agent-to-agent spread via PRs and issues
Example: The stolen publishing token pushes a new version of the company’s SDK through its normal release pipeline. The company’s unattended review agent reads the related PR and waves it through, and the company’s customers install the backdoored SDK.
What to Watch for at Each Stage
Here is what defenders can watch for, based on the 2026 investigations and the 2027 techniques above.
- Flag downloads from repos that advertise “leaked” or “unlocked” tools, and executables or ZIP archives pulled from newly created GitHub repos.
- Alert on skill and tool installs whose names look like typosquats of popular ones.
- Review every PR that touches rules, agent instruction files, skills or MCP configs, especially bulk PRs from new accounts.
- Scan skills for base64 blobs and password-protected ZIP downloads.
- Flag repo configs that pre-approve execution or add hooks, and flag unpinned tool servers.
- Open untrusted repos in a sandbox so project config can’t load with full privileges.
- Scan tool output and fetched pages for instruction-like text before the agent acts on it, including hidden text in issues and comments.
- Fingerprint tool definitions when they are approved, and alert if they change later.
- Alert on commands that read
~/.ssh,~/.aws,~/.kubeor shell history, and on base64-decode-to-shell and curl-to-bash patterns. - Look at actions across a whole session, not one call at a time, to catch slow-drip behavior, and require human approval for shell commands, installs and network calls.
- Look for unexpected
.pthfiles insite-packages, such aslitellm_init.pth, and for the headerX-Filename: tpcp.tar.gzin egress logs. - Alert on AI gateway and model-key use from new hosts or at unusual volume, and on publishing tokens used from new hosts or package publishes nobody planned.
- Pin GitHub Actions to commit SHAs, verify package provenance and alert on unexpected dependency versions and CI workflow edits.
- Treat PRs and issues from new accounts or other agents as untrusted input for unattended review agents.
- Use long behavioral windows on egress, since TeamPCP beaconed only about every 50 minutes.
From Borrowed Trust to Privileged Identity
The root problem is trust: the agent borrows the developer’s. We expect that to start changing in 2027.
Today, 2026 | 2027 |
|---|---|
| The developer is the trust boundary | The agent becomes a privileged identity |
| Agents inherit the developer’s full access | Agents get their own scoped, short-lived credentials |
| Project files are trusted by default | MCP servers and skills are inventoried and pinned |
| Review focuses on code, not agent context | Agent activity is logged like admin activity |
What to Do Now
1- Know what you have. List the coding agents, MCP servers and skills in use, including the ones developers installed on their own.
2- Pin and review MCP servers and skills. Treat them like any other dependency: pin versions and re-check them, because a review that was clean at install can go stale.
3- Stop pre-approving everything. Ask for human approval before agents run shell commands, install packages or make network calls, especially in repositories you don’t know.
4- Review agent config files in pull requests. Rules files, MCP configs and skill definitions deserve the same scrutiny as code.
5- Limit what a hijacked agent could steal. Use short-lived, narrowly scoped credentials, keep secrets out of environment variables where you can and run agents in a sandbox when opening untrusted projects.
6- Watch what leaves the developer environment. Keep an eye on where source code, tokens and secrets go, because getting data out is the step every chain above shares.
Every stage in the chain above already has a 2026 incident attached to it. 2027 does not need a new attack chain to prove the point. It needs the same chain, run faster and blended in better. The question is no longer whether a coding agent will act on an instruction it should not have trusted. It will. The question is whether anyone is watching when it does.
That is the shift underneath everything above: from securing code to securing the trust an agent is extended by default. Teams that start treating agent activity, MCP installs and skill updates as privileged access now are the ones with a chain to break the next time this plays out.

Mayur Sewani
더 많은 기사 읽기 Mayur SewaniMayur serves as a Senior Security Researcher as part of the Forcepoint X-Labs Research Team. He focuses on APT malwares, information stealers, phishing attacks, and also works to stay on top of the latest threats. He is passionate about advancing the field of defensive adversary emulation and research.
The Enterprise Guide to AI Data Security전자책 읽기
X-Labs
내 받은 편지함으로 인사이트, 분석 및 뉴스 바로 받기
