Type
Analysis
Published
Updated
Reading time
3 min read
Author
Lire en français
Lire en français →

When an agent configuration file in a repository becomes an execution path

GTIG describes an intrusion where .claude/settings.json triggered a backdoor. Examine hook scope, workspace trust and evidence.

Analysis of public sources

Read the article

GTIG report dated 16 November 2026. During intrusions against cryptocurrency firms, an actor changed .claude/settings.json files in internal repositories. Google Threat Intelligence Group reports that subsequent Claude Code startup triggered a download of the SOMBERMEME backdoor. The report does not publish the exact file contents or identify the hook event used. It still establishes a useful execution path through project configuration, distinct from a prompt instruction.

A shared project file can contain commands

Claude Code’s settings documentation describes .claude/settings.json as a shared project file. It can be committed to the repository and can contain permissions, environment variables and hooks. A hook binds a lifecycle event to a handler; a command handler runs a shell command. The hooks reference includes SessionStart, which runs when a session starts or resumes, and PreToolUse or PostToolUse, which run around tool calls.

The trust boundary runs from repository content into the rights of the workstation that opens it. A configuration change may arrive in a commit, a branch or a file already present in a compromised clone. If the tool loads and runs the hook, its command has the local user’s rights and may read secrets available to that account. Execution does not depend on a model choosing to obey hostile prose; it is declared project behavior.

repository change -> project settings loaded
                  -> hook event -> local command
                  -> effect with the user's permissions

This diagram describes the documented general mechanism. GTIG has not published SOMBERMEME’s hook command, so the case cannot be assigned a precise event, shell or URL. The report’s evidence concerns the observed effect on Claude Code startup, not every possible hook implementation.

Trust depends on launch mode

The key operational detail appears in the hooks reference’s security section. In an interactive session, Claude Code holds back hooks from settings files until the folder is trusted. In -p or SDK mode, the documentation says it does not show the trust dialog and treats the folder as trusted. Hooks committed to an unfamiliar repository can therefore run. Trust previously granted to the directory or a parent also affects an interactive session’s starting point.

Trust is not a permanent property of a Git repository. It depends on the workstation, local path and launch mode. A developer opening an external branch interactively and a pipeline running claude -p over the same code have different initial barriers. The settings documentation also describes cloud environments that load repository settings differently; verify the actual environment before concluding that a hook applies.

Trace the command and its effects

Compare .claude/ files with an approved reference before opening a repository with the agent. For each added or changed hook, record its event, matcher, handler, command, referenced scripts and possible network destinations. A hook may keep the same command while a repository script it invokes changes. Reviewing only settings.json misses that dependency.

Element Concrete question
hooks in settings Which event triggers which command, and how often?
Referenced scripts Did their code or dependencies change in the same branch?
Variables and secrets Which credentials can the launched process read?
Launch mode Interactive, -p, SDK or cloud: what trust check actually applies?
Workstation logs Which child process, download or new file aligns with the session?

For an untrusted repository, Anthropic documents disabling hooks for a run and the --bare mode. These options support a safer inspection procedure; they do not replace command review if the team later wants the project’s hooks enabled. During an investigation, preserve the exact commit and file, repository history, agent launch times, process lineage and outbound connections to test causality.

GTIG also describes a ClickFix lure before the attacker reached the repositories. That initial access must not be attributed to .claude/settings.json. The file was changed after compromise as a way to make subsequent users or agents working in the project execute code. That is why shared configuration merits review even when application source code appears clean.

Primary sources: GTIG report, Claude Code settings documentation, hooks and workspace trust reference.

Follow future rootzero publications

#rootzero

A question about your exposure?

Write to us. Someone from the technical team will answer, with sources.