T01 · Skill Instruction Hijacking
- Location
SKILL.md:12- Finding
Untrusted Project and Ancestor Files Can Be Loaded as Privileged Agent Instructions
- Content
View full analysis
MAX_CHARS: combin ...[truncated 4442 chars]- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not destructive, but it automatically loads local CLAUDE.md files into privileged agent context without enough scoping or user control.
Review this skill carefully before installing. It should only be used in repositories where you trust the CLAUDE.md files in the project and its parent directories. Prefer an implementation that runs only on explicit request, shows exactly which files will be loaded, and treats repository instructions as untrusted reference text rather than privileged system instructions.
SKILL.md:12Untrusted Project and Ancestor Files Can Be Loaded as Privileged Agent Instructions
The skill is configured to run automatically on every user message, which creates an overly broad trigger surface for reading local project files without an explicit user request. In this context, the skill then traverses directories, loads CLAUDE.md content, and injects it into system context, increasing the risk of prompt injection, unintended disclosure of sensitive instructions, and surprising behavior across all conversations.
The implementation states that the skill reads CLAUDE.md files, processes @include directives, and injects the resulting content into system context, but the description does not warn the user that local files are being automatically consumed. This reduces informed consent and makes prompt-injection risk worse, because attacker-controlled repository files can influence model behavior through hidden context loading.
Automatically discovering and loading CLAUDE.md files from ancestor directories creates an implicit trust chain where higher-level files can silently inject instructions into the model context. This is dangerous in prompt-injection terms because unrelated or malicious parent-directory content can override project-local intent and steer agent behavior without visibility or approval from the user.
The script automatically reads local CLAUDE.md files from the current and ancestor directories and prints their contents for injection into model context, which can expose sensitive local instructions, secrets, internal paths, or policy text without any explicit consent or warning. In an agent-skill context, this is particularly risky because the discovered content is not just displayed but may directly influence downstream model behavior.
All user-facing natural-language content in the file is presented in Chinese, with no indication that the user can choose another language or that the skill is intentionally region-specific. This can be a language/locale policy concern when a skill implicitly forces one language without opt-in or justification.
User-facing descriptive text and docstrings are written in Chinese, which can impose a language preference on users or maintainers without opt-in. The file does not indicate that the skill is region-specific or provide an alternative language option.