Prompt Injection PatternPublished Apr 2, 2026

agents.md writes to CLAUDE.md at runtime

HighAARM tierConfirmed
Seen7times across2customers
jiffy-ti-2026-000077

Summary

agents.md tells the agent to "update CLAUDE.md with learnings from this session." The agent, executing the directive, writes attacker-crafted text into the pinned CLAUDE.md, poisoning future sessions.

Severity & confidence

Severity
High

High

Credible abuse path with meaningful impact on confidentiality, integrity, or availability. Remediate on a short timeline; do not wait for the next sprint cycle.

Confidence
Confirmed

Confirmed

Observed directly by Jiffy scanners or validated by multiple independent sources. Indicators are reliable enough to drive automated action.

Indicators

Observed patterns and artifacts associated with this entry. Each indicator can be copied into your detection stack or SIEM.

  • (?is)(?:update|modify|write)\s+CLAUDE\.md

Detection rule

A YARA-style pseudo-rule auto-generated from the indicators above. Useful as a starting point — adapt the syntax for your target detection platform.

YARA-style pseudo-rule
rule jiffy_ti_2026_000077
{
    meta:
        source = "jiffy-intel"
        severity = "high"
        description = "Auto-generated from Jiffy Intel indicators"
    strings:
    $content_pattern_0 = "(?is)(?:update|modify|write)\\s+CLAUDE\\.md"
    condition:
        $content_pattern_0
}

Auto-generated from the indicators above. Adapt syntax for your detection stack before deploying.

Affected tools

ToolVersionsStatus
Claude Code*vulnerable
Cursor*vulnerable

Example artifacts

Sanitized examples of artifacts Jiffy has observed exhibiting this pattern. Publisher handles are redacted; version ranges and status reflect the most recent scan.

  • agents.md (repo: learning-template)IDE rules
    Under review
    Source
    GitHub (public repo)
    First observed
    Mar 23, 2026
  • .cursorrules (repo: adaptive-dev)IDE rules
    Quarantined
    Source
    GitHub (public repo)
    First observed
    Mar 27, 2026

How to remediate

  1. 01Make CLAUDE.md read-only at the agent tier.
  2. 02Require human review for any rule-file edit.

Timeline & sources

Timeline

  1. First observedMar 23, 202625 days ago
  2. Last updatedApr 28, 2026today
  3. PublishedApr 2, 202615 days ago

Sources

scanner

References

Scan for patterns like this

Point Jiffy at your GitHub org, IDE config, or a single artifact. Get a scored report in under a minute.

Start a free scan