title: SKILL.md Prompt Injection
id: ATR-2026-00120
rule_version: 1
status: experimental
description: |
  Detects prompt injection patterns embedded in SKILL.md files. 91% of confirmed malicious skills combine prompt injection with malware delivery (Snyk ToxicSkills, Feb 2026). Patterns include: system message impersonation, DAN-style jailbreaks, instruction override, and safety disablement. The convergence attack flow uses prompt injection first to disable safety warnings, then delivers malicious payloads. Real campaign: ClawHavoc (1,184 skills) used injection to bypass agent safety before credential exfiltration.
author: ATR Community
date: 2026/03/29
schema_version: '0.1'
detection_tier: pattern
maturity: test
severity: critical
references:
  mitre_atlas:
    - AML.T0010 - AI Supply Chain Compromise
  owasp_llm:
    - LLM01:2025
  owasp_agentic:
    - ASI01:2026
  owasp_ast:
    - AST01:2026 - Malicious Skills
    - AST05:2026 - Unsafe Deserialization
  research:
    - 'Snyk ToxicSkills: 91% convergence rate (Feb 2026)'
    - 'arXiv 2601.17548: 85%+ attack success rate'
    - 'ClawHavoc campaign: 1,184 malicious skills'
metadata_provenance:
  mitre_atlas: auto-generated
compliance:
  nist_ai_rmf:
    - subcategory: MP.5.1
      context: SKILL.md prompt injection patterns including DAN-style jailbreaks, instruction override, and system message impersonation are adversarial inputs that exploit the skill loading pipeline; MP.5.1 requires identifying and characterizing these prompt injection attack vectors as part of GenAI risk impact assessment.
      strength: primary
    - subcategory: MG.3.2
      context: SKILL.md files are third-party content loaded into agents from skill marketplaces (e.g., ClawHavoc's 1,184 malicious skills); MG.3.2 requires monitoring pre-trained models and external artifacts for compromise, and detecting injection payloads in skill manifests directly evidences this supply-chain monitoring control.
      strength: secondary
    - subcategory: MG.2.3
      context: Detection of jailbreak and safety-disablement patterns in skills triggers deactivation workflows to block the skill before the convergence attack flow proceeds to malware delivery; MG.2.3 mandates mechanisms to supersede or disengage compromised AI components on detection.
      strength: secondary
    - subcategory: MS.2.7
      context: NIST AI RMF MEASURE 2.7 (security and resilience evaluated and documented) is supported by this rule's runtime detection of the skill supply-chain compromise (SKILL.md Prompt Injection).
      strength: primary
    - subcategory: MG.3.1
      context: NIST AI RMF MANAGE 3.1 (third-party resources regularly monitored) is supported where this rule detects the skill supply-chain compromise (SKILL.md Prompt Injection).
      strength: secondary
  iso_42001:
    - clause: '8.1'
      context: ISO/IEC 42001 Clause 8.1 (operational planning and control, including control of externally provided processes) is operationalised by this rule's detection of the skill supply-chain compromise (SKILL.md Prompt Injection).
      strength: primary
    - clause: '8.3'
      context: ISO/IEC 42001 Clause 8.3 (AI risk treatment) is supported by this rule, which implements runtime detection of the skill supply-chain compromise (SKILL.md Prompt Injection) as a treatment control.
      strength: secondary
  eu_ai_act:
    - article: '15'
      context: Article 15 (accuracy, robustness and cybersecurity) requires high-risk AI systems to resist unauthorised attempts to alter their use, outputs or performance; this rule provides runtime detection evidence by flagging the skill supply-chain compromise (SKILL.md Prompt Injection).
      strength: primary
    - article: '9'
      context: Article 9 (risk management system) requires identified risks to be addressed by appropriate measures; this rule is a runtime risk-treatment control that detects the skill supply-chain compromise (SKILL.md Prompt Injection).
      strength: secondary
tags:
  category: skill-compromise
  subcategory: skill-instruction-injection
  scan_target: skill
  confidence: high
agent_source:
  type: mcp_exchange
  framework:
    - mcp
    - skill_md
  provider:
    - any
detection:
  conditions:
    - field: content
      operator: regex
      value: (?i)(you\s+are\s+(now\s+)?in\s+(developer|unrestricted|god|admin|root)\s+mode|security\s+warnings?\s+are\s+test\s+artifacts?|enable\s+advanced\s+features?\s+mode)
      description: DAN-style jailbreak disabling safety mechanisms (Snyk convergence pattern)
    - field: content
      operator: regex
      value: (?i)(you\s+(must|should|will|shall)\s+(ignore|disregard|override|forget|bypass|circumvent|supersede|set\s+aside|discard|abandon)\s+(all\s+)?(previous|prior|system|safety)\s+\w*\s*(instructions?|rules?|guidelines?|prompts?))|((?:ignore|disregard|bypass|circumvent|supersede|set\s+aside)\s+all\s+(previous|prior|safety|system)\s+\w*\s*(instructions?|rules?|guidelines?|prompts?))
      description: AI-directed instruction override with synonym expansion (arXiv D1 + skill-sanitizer research)
    - field: content
      operator: regex
      value: (?i)(\[SYSTEM\]\s*:|<\|system\|>|<system>(?![(/])|\[INST\]\s*:|<\|im_start\|>system|<<SYS>>)
      description: System message impersonation — excludes markdown links [system](path) (arXiv hierarchy exploitation)
    - field: content
      operator: regex
      value: <!--(?:(?!-->)[\s\S]){0,500}?(?:(?<!-)\bignore\b(?!-)|(?<!-)\boverride\b(?!-)|(?<!-)\bbypass\b(?!-)|\bcurl[ \t]|\bwget[ \t]|\beval[ \t]|\bexec[ \t]|\bbase64|\bnc[ \t])(?:(?!-->)[\s\S]){0,200}?-->
      description: 'Malicious instructions hidden in HTML comments (keywords anchored at word boundary to avoid substring FPs like ''async''->''nc '', ''retrieval''->''eval ''). ignore/override/bypass additionally require no adjacent hyphen, since standard tooling directives (''prettier-ignore'', ''eslint-ignore'') collide with a bare \bignore\b word boundary. curl/wget/eval/exec/nc require a following space or tab (not \s, which also matches newline) so a URL path segment or label ending a line (e.g. ''[execaction]: .../stackql-exec\n'') doesn''t false-match \bexec\s at the line break. Both surrounding spans are now tempered ((?!-->)[\s\S]) so the whole match can never cross a ''-->'' boundary into a SEPARATE comment — without this, whitespace-collapsing normalization (turning newlines into spaces) re-exposed the stackql-exec false positive by merging what were originally 3 separate short HTML comments into one span the old greedy [\s\S]{0,500} could freely traverse.'
    - field: content
      operator: regex
      value: '[\u200B\u200C\u200D\u2060\uFEFF]{3,}'
      description: Unicode contraband injection (zero-width character cluster)
  condition: any
  false_positives:
    - Security research skills discussing prompt injection techniques
    - Skills that teach prompt injection defense
    - Documentation that explains how developer mode works in an IDE, e.g. 'You are now in developer mode' appearing in a tutorial about VS Code debug configurations
    - A skill that discusses historical prompt injection attacks in an academic context, quoting attack taxonomies without using the exact trigger phrases
response:
  actions:
    - block_tool
    - alert
  actions_rationale: 'response-action eligibility (docs/RESPONSE-ACTION-ELIGIBILITY.md): benign FP 10/5352 = 0.19% meets the 0.5% ceiling but is not zero; ceiling = degrade. Removed quarantine_session(terminate). Detection unchanged — recall cost is zero.'
  message_template: |
    [ATR-2026-120] SKILL.md prompt injection detected. This skill contains instruction override, safety disablement, or system impersonation patterns commonly used in convergence attacks (91% of malicious skills per Snyk).
confidence: 74
wild_validated: 2026/04/08
wild_samples: 53577
wild_fp_rate: 0.1512
