T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:7- Finding
Execution of an Unverified External Tool from a Discoverable Skills Root
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 7
Vulnerability Type: T07: Skill Instruction Hijacking and Spoofing
Risk Level: HighVulnerable code snippet:
markdown Read `references/provider-selection.md` before choosing a source. Detect what is already available, run with it, deliver value, then recommend at most one missing connector. All normalized factual inputs must satisfy the Groundcrew evidence contract. Locate the active skills root and run `<skills-root>/.groundcrew/groundcrew-doctor.py --evidence <record.json>` before using them in a conclusion.Technical Analysis
The skill directs the agent to discover an “active skills root” and execute
.groundcrew/groundcrew-doctor.pyfrom that location. This executable is not included in the audited project and is not constrained by an exact trusted path, pinned cryptographic digest, signature, or other integrity verification.Consequently, the effective code executed by this instruction depends on mutable local state outside the reviewed package. A malicious or compromised component capable of writing to the selected skills root could place or replace the expected script with attacker-controlled Python code. The file would retain the appearance and path of a legitimate validation tool while executing arbitrary behavior.
Passing
<record.json>to the unverified program also exposes that evidence file to the external process. If the evidence contains sensitive business, analytics, site, or customer information, malicious code could read and disclose it. Exploitability requires the attacker to control or modify the discovered skills root, influence its resolution, or compromise the component that provisions the external validator.Attack Path
- An attacker obtains write access to a candidate active skills root or influences which directory is resolved as that root.
- The attacker creates or replaces
.groundcrew/groundcrew-doctor.pywith mali ...[truncated 1225 chars]
- Remediation
View remediation
Remediation Suggestions
- Bundle the validator inside the audited skill package so that the reviewed artifact contains the exact code that will execute.
- Resolve the validator from a fixed package-relative path rather than searching for an active skills root.
- Verify the validator against a pinned cryptographic digest or trusted signature immediately before execution.
- Refuse execution when the resolved script is a symbolic link, is outside the approved package directory, has unexpected ownership or permissions, or fails integrity verification.
- Invoke the interpreter with an argument array rather than constructing a shell command. Treat the evidence path as an opaque argument and validate that it points to an expected regular file.
- Run validation in a restricted subprocess with minimum filesystem access, a sanitized environment, no inherited secrets, and network access disabled unless explicitly required.
- If an external validator remains necessary, display its resolved absolute path and integrity identity and require explicit user approval before first execution.
- Document the validator’s trusted source, versioning process, expected permissions, and update mechanism so that replacements are auditable.
