C:\ProgramData on every managed endpoint, owned by Administrators or SYSTEM, without the inherited permissions that let the Users group create files and subfolders. A standard user then cannot create the folder or add a file, so planting fails before any tool reads a setting. Folders that already exist must be taken over too, because whoever created a folder can rewrite its permissions. Auditing the same folders sends every create or change attempt, allowed or denied, to the SIEM with the acting account. That is detection: it finds endpoints the baseline missed and files planted earlier, but it cannot stop a command a tool has already loaded.ProgramData Configuration Trust: A Standard Windows User Could Plant Commands That Run in Other Users' AI Coding Tool Sessions
Cymulate Research Lab found that four AI coding tools on Windows, Claude Code, Cursor, OpenAI Codex CLI and Google Gemini CLI, read a machine-wide configuration file from a vendor folder under C:\ProgramData, where a standard user can create folders and files by default. A user without administrator rights could plant a file there that defines a hook (a command the tool runs automatically on an event such as session start) or a Codex notify command, and the command then runs in the account of whoever next uses the tool on that machine, including an administrator. Anthropic fixed Claude Code in 2.1.75 (CVE-2026-35603, a public vulnerability identifier that covers Claude Code only); Cymulate reports no committed fix for the other three tools when it wrote, and there is currently no public evidence of real-world use.
Threat Analysis
- A shared folder that any user can write to.
C:\ProgramDataholds application data shared by every user of a Windows machine, and Cymulate notes that its default permissions let ordinary users (the Users group) create subfolders and files there. Each of the four tools reads a machine-wide configuration file from its own subfolder: Claude Code fromC:\ProgramData\ClaudeCode\managed-settings.json(tested on version 2.0.76), Cursor fromC:\ProgramData\Cursor\hooks.json, Codex CLI fromC:\ProgramData\openai\codex\config.tomland Gemini CLI fromC:\ProgramData\gemini-cli\system-defaults.json. In Cymulate's tests no tool created or restricted that subfolder at install time, and none checked the file's owner or integrity before loading it. - How a planted file becomes a command in someone else's session. A standard user, or malware running as that user, creates the missing folder and writes a configuration file that points the tool's event-triggered command feature at a command of their choice; no elevation is needed. When another user works with the tool, the configured event fires. In Cymulate's examples that is session start for the Claude Code and Gemini CLI hooks, a prompt sent to an agent for the Cursor hook, and each agent turn for the Codex CLI
notifycommand. The tool runs the command with that user's identity and permissions, outside any sandbox, and Cymulate reports no approval dialog, signature check or warning. No prompt injection or model decision is involved, so prompt filters and model-side safeguards never see this path. - What the attacker gains. The command can reach whatever the victim's account can reach; Cymulate lists environment variables, source code, SSH keys, cloud tokens and Git credentials. If an administrator launches the tool, a standard account has obtained administrator-level execution, which is a local privilege escalation, and because the file stays in place the command runs again at every later launch. For Codex CLI, the same planted
config.tomlcan also setsandbox_mode = "danger-full-access"andapproval_policy = "never", which removes the sandbox and the approval prompts from the victim's agent session. These are the capabilities Cymulate validated; its article does not report data taken from a real victim or a later agent action under the changed settings. - Claude Code: fixed in 2.1.75. Cymulate reported the issue on January 5, 2026. Anthropic retired the ProgramData location, moved managed settings (settings that enterprise IT deploys centrally) to a write-protected Program Files path, and notified affected enterprise customers before the change went out. Its advisory of April 17, 2026 scores the flaw 5.4 under CVSS v4 (Moderate), lists versions before 2.1.75 as affected and 2.1.75 as patched, and notes that the attack needed a shared multi-user Windows system and a victim who launched Claude Code after the malicious file was placed.
- The other three: no committed fix when Cymulate wrote. According to Cymulate's article (published June 17, 2026, last updated August 11, 2026), Cursor received the report on January 12, 2026 and had given no formal verdict more than five months later, with the issue still reproducible. The Codex CLI report was submitted through the bug bounty platform Bugcrowd on February 16, 2026 and validated as reproducible; after more than two months it was moved to Unresolved with no fix or timeline. For Gemini CLI, the formal reply from the Google Cloud Vulnerability Reward Program was that the finding "will be addressed as a documentation update". As of November 2026 the Cursor and Gemini CLI documentation still lists these ProgramData paths without saying how the folder is permissioned, so teams should check their own endpoints and not assume the status has changed.
Applicable AIDEFEND Defenses (4)
sandbox_mode = "danger-full-access" and approval_policy = "never", to quarantine or review. It needs a product that scans file content on create and modify events, keyword rules can be evaded, and a launch before quarantine still runs the command, so it is a compensating check and not the primary boundary.What Defenders Should Do Now
- Lock the four folders, then prove it. Start with machines that more than one person signs in to: shared build hosts, jump boxes and laptops that IT administrators also log on to. Use Group Policy or your configuration-management tool to create the four vendor folders on every managed Windows endpoint, owned by Administrators or SYSTEM, with only those two allowed to create or change files. Then sign in with a standard test account and try to create the folder, add a file to it and overwrite an existing file. All three must be denied, and an update pushed by the management tool must still succeed. Check as well for configuration files already in those folders that IT did not deploy.
- Update Claude Code and move its managed settings. Confirm that every installation reports version 2.1.75 or later, and handle manually updated installations first. If your organization deploys managed settings, place them at
C:\Program Files\ClaudeCode\managed-settings.json. Anthropic's documentation states that Claude Code no longer reads the old ProgramData path, so a policy file left there does not take effect. - Keep the other three tools on the open-findings list. Record the folder restriction for Cursor, Codex CLI and Gemini CLI as a compensating control with an owner and a review date. After each vendor release, repeat the test on an isolated machine that does not have the restriction: as a standard user, plant a harmless configuration whose command only writes a marker file, start the tool from a second account, and see whether the marker file appears. Close the finding only when the marker no longer appears or the vendor formally documents a fix.
- Monitor the folders, and know what to do on a hit. Send file-creation and file-change events for the four folders to your SIEM, alert whenever the writing account is not the management tool or an administrator, and generate a test event to confirm the alert arrives. If you find a planted file, keep a copy, remove it and restore the folder restriction. Then work out which accounts started the tool after the file was created, and at each issuing service revoke and reissue the credentials those sessions could reach, such as SSH keys, cloud tokens and Git credentials.
2 additional considerations
Keep AI coding tools out of administrator sessions
Process monitoring for hook and notify commands
Conclusion
C:\ProgramData does not get that protection unless someone sets it. AIDEFEND maps this attack path to write protection for agent configuration files: with the four vendor folders locked down, a standard account cannot even place the file. Around that primary boundary sit remediation tracking for the patched and unpatched tools, an endpoint rule on configuration content, and eviction of a confirmed planted file.Last updated: