Summary
Nothing beyond actions developers take every day was involved: opening a project and trusting a folder. The researchers at Adversa AI reported that major AI coding agents treat those actions as sufficient permission and automatically execute config bundled in a repository (agent settings, MCP server definitions, startup hooks). The vendor researchers safedep and StepSecurity report that the self-propagating malware Miasma used this pattern to steal credentials from developers who opened the project, and that GitHub disabled 73 repositories across four Microsoft organizations. The disabling came after the config had run. Opening a project or trusting a folder says nothing about where its bundled config came from. Unless the author and the allowed scope are checked before execution, planted config passes as an ordinary launch.
A pre-execution check means checking, before an agent executes bundled config, its author and the allowed scope, and keeping a record. Detection means finding and stopping things after execution, through researchers' reports or detection of malicious commits. Dates follow the timeline in section 05.
Credentials were stolen and it spread to other repositories
What got through
- What got through
- AI coding agents loading and executing config bundled in a repository. According to safedep, Miasma’s third wave planted Claude Code, Gemini CLI, and Cursor config files in repositories and ran a credential-stealing program as soon as a developer opened the project in an AI coding tool.
- What the researchers reported
- Adversa AI reported a flaw in which an operation that looks like a harmless file copy rewrites the agent’s own config so that attacker code runs at the next launch (SymJack), and a flaw in which approving folder trust starts a project-defined MCP server without explicit approval (TrustFall). It says neither the approval prompt nor the displayed file operation accurately conveys what will actually run.
- What reached the receiving side
- In general, the agent receives the user’s action of opening the project or trusting the folder, and the config files in the repository. Who wrote that config, and how much execution it is allowed, cannot be told from these.
- What execution delivered
- According to the reports, the credentials available to the development environment for GitHub, npm, AWS, Azure, GCP, Vault, Kubernetes, and more. Miasma used them to place the same kind of config in other repositories and packages within reach, and spread (safedep, StepSecurity).
- Not disclosed
- Which path infected each repository, how many credentials were stolen, and how far restoration has progressed. How each tool changed its folder-trust defaults or the automatic execution of bundled config could not be confirmed from this Brief’s sources.
Pre-execution check
The condition that can be told apart whatever the route is this: before an agent loads and executes config bundled in a repository, check whether that config comes from its legitimate author and stays within the scope it is allowed to run in.
Opening a project or trusting a folder says nothing about where its bundled config came from. Unless the author and the allowed scope are checked before execution, planted config passes as an ordinary launch.
- Who approves
- The legitimate author who wrote the config, and the user or organization that decides how much the agent may execute. Opening a project or trusting a folder does not stand in for this approval.
- Where it is checked
- Before the agent loads bundled config and starts MCP servers or startup hooks. Config that cannot be checked is not executed until it can be.
- What is kept
- A record of which config was executed (or held), on confirmation of which author, with which scope allowed. Later, legitimate operations can be shown apart from operations driven by planted config.
Researchers’ reports, detection of malicious commits, and the disabling of repositories all worked, and the techniques and infections became visible from outside. But the disabling came after the config had run and credentials had been stolen. Similar cases where config brought in from outside went straight to execution are GitSpawn, where opening a folder made AI coding agents run code (Brief 147); related are a user-specified MCP URL carrying out the server’s secrets in Brief 027, MCP server authentication bypassed via the Host header in Brief 003, and an artifact that was malicious despite a valid signature in Brief 014.
What Lemma does
Lemma builds the pre-execution check into the steps by which an agent executes bundled config. It does not detect after infection; before execution, it checks whether the config comes from its legitimate author and stays within the allowed scope, and does not let through executions that cannot be checked.
Industries and operations to watch
- IndustryDevelopers & agent operations
- Developers and organizations that open repositories received from outside with AI coding agents.
- IndustryAI adoption (all industries)
- Organizations that use AI coding agents in development environments that hold credentials for cloud services and package publishing.
Current controls vs Lemma
The route in this case is the agent executing bundled config when a project is opened, and the same kind of config being placed in other repositories with stolen credentials.
| Control | Executing bundled config (on opening a project) | Spread to other repositories via stolen credentials |
|---|---|---|
| Folder-trust prompt (approval prompt) | Not effective | Not applicable |
| Signature checks | Not effective | Not effective |
| Detecting malicious commits and disabling repositories | Not effective | Partial |
| Lemma (pre-execution check) | Effective | Partial |
In Adversa AI’s report, approving the folder-trust prompt started MCP servers and did not accurately convey what would run. Signature checks only show that a repository is valid and cannot tell, before execution, whether the config will steal credentials; the spread passes through trusted publish and commit paths, so it passes signature checks. Detecting malicious commits and disabling repositories was how the incident was contained, stopping 73 repositories, but it worked after the config had run and credentials had been stolen. Lemma checks the author and the allowed scope before the agent executes bundled config. It does not revoke the stolen credentials themselves, so the spread column stays partial.
Note: Lemma’s check works only when the agent builds the check into the step that loads bundled config, and confirmation of the legitimate author and the allowed scope are managed outside the agent. If a legitimate author’s key is stolen and used to write the config, this check can be passed. It does not judge whether the config itself is safe. The table compares what each control checks; it does not show whether this incident would have been stopped. Lemma does not detect or prevent intrusions.
Three things to confirm for organizations that use AI coding agents
- Before an agent executes config bundled in a repository received from outside (agent settings, MCP server definitions, startup hooks), do you confirm its author?
- Is folder-trust approval set up so that it does not, by default, permit bundled config to run without showing what will run?
- Do you record, outside the agent, which config was executed on confirmation of which author?
Facts and timeline
- Target
- AI coding agents that execute config bundled in repositories. Adversa AI reports confirming SymJack on Claude Code, Gemini CLI (Antigravity), Cursor, GitHub Copilot, Grok Build, and others, and TrustFall on Claude, Cursor, Gemini CLI, and GitHub Copilot.
- Researchers’ reports
- Adversa AI published TrustFall in early May 2026 and SymJack on May 26. Both concern a mismatch between the approvals and operations the user sees and what actually runs.
- Real-world abuse
- On June 2, the Microsoft Security Blog published Miasma’s credential-stealing technique. According to safedep, after spreading via npm preinstall hooks (first wave) and binding.gyp execution (second wave, Phantom Gyp), Miasma shifted in its third wave to planting AI agent config files in repositories. The reports say it fetches the Bun runtime to start a next-stage program, harvests credentials, and self-propagates.
- Scale
- According to StepSecurity, on June 5, 2026, GitHub disabled 73 repositories across four Microsoft organizations (Azure, Azure-Samples, Microsoft, MicrosoftDocs). Microsoft explained that it had temporarily removed some repositories and would restore them in sequence after review.
Glossary
MCP server — A server that connects an AI agent to external tools and data. If a project's config defines one, the agent starts it.
Folder trust — The prompt asking the user whether an opened folder's config and code may run. Adversa AI reports that it defaulted to "trust" and that approving it auto-started project-defined MCP servers.
Timeline
- Early 2026-05
- Adversa AI publishes TrustFall (approving folder trust auto-starts MCP servers).
- 2026-05-26
- Adversa AI publishes SymJack (the agent’s config is rewritten and runs at launch).
- 2026-06-01 to 03
- Miasma spreads via npm preinstall hooks (first wave) and binding.gyp execution (second wave).
- 2026-06-02
- The Microsoft Security Blog publishes Miasma’s credential-stealing technique via Red Hat’s npm channel.
- 2026-06-03 to 05
- Miasma’s third wave. It shifts to planting AI agent config files in repositories and stealing credentials as soon as a project is opened (safedep).
- 2026-06-05
- GitHub disables 73 repositories across four Microsoft organizations (StepSecurity).
Because the infection path and restoration status of individual repositories depend on how the investigation progresses, this Brief does not assert them. The characterization of the techniques rests on the reports of Adversa AI, safedep, StepSecurity, and Microsoft; this Brief does not cover the views of each agent vendor. What has not been disclosed does not mean there were no controls.
After disclosure
- GitHub and Microsoft: GitHub detected malicious commits and disabled repositories; Microsoft explained that it had temporarily removed some and would restore them after review.
- AI coding tools: Folder-trust defaults, the automatic execution of bundled config, and the handling of MCP server auto-start have become points of discussion.
Sources
- research, primaryAdversa AI “The approval prompt is lying: a critical coding agent security flaw” (SymJack, 2026-05-26, symlink spoofing overwrites agent config)
- research, primaryAdversa AI “TrustFall: coding agent security flaw enables one-click RCE in Claude, Cursor, Gemini CLI and GitHub Copilot”
- primaryMicrosoft Security Blog “Preinstall to persistence: Inside the Red Hat npm Miasma credential-stealing campaign”
2 more (reporting, analysis)
- vendor researchStepSecurity “Miasma Worm Hits Microsoft Again: Azure Functions Action and 72 Other Repositories Disabled”
- vendor researchsafedep “Miasma Worm Targets AI Coding Agents via GitHub Repos” (third wave, auto-execution via config injection of
.claude/settings.jsonetc.)
References: “The last layer left for cyber defense in the age of AI”