T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:10- Finding
Execution of an Unverified External Validation Tool
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 10
Vulnerability Type: Unverified local tool execution
Risk Level: MediumVulnerable Code Snippet
markdown 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 instructs the agent to discover an “active skills root” dynamically and execute
groundcrew-doctor.pyfrom that location. The referenced script is not included in the audited project, and the instruction does not require the agent to verify the resolved canonical path, ownership, integrity, provenance, or cryptographic digest of the executable before running it.This creates a local tool-spoofing risk: an attacker who can influence the selected skills root or replace the
.groundcrew/groundcrew-doctor.pyfile can cause a legitimate-looking validation command to execute attacker-controlled Python code. The project’s references to evidence validation do not mitigate arbitrary code execution by an untrusted validator.The finding is constrained to the execution instruction. The supplied artifact contains no copy of the validator, so the validator’s implementation and actual behavior could not be audited.
Attack Path
- An attacker gains write access to a directory that may be selected as the active skills root, or influences skills-root discovery so that an attacker-controlled directory is selected.
- The attacker creates or replaces
.groundcrew/groundcrew-doctor.pywith a malicious Python program. - The agent loads this skill and follows the instruction in
SKILL.md. - The agent resolves
<skills-root>to the attacker-controlled or compromised location. - The agent executes the spoofed validator while processing an evidence record.
- The malicious program runs with the permissions and accessible environment of the agent process.
Impact Assessment
Successful exploitation perm ...[truncated 647 chars]
- Remediation
View remediation
Remediation Suggestions
- Bundle the validator in the reviewed skill package so its implementation is included in security review and version control.
- Resolve the validator only from a trusted, immutable installation directory rather than a dynamically discovered writable skills root.
- Canonicalize the path and reject symlinks, path traversal, unexpected ownership, and user-writable parent directories.
- Pin an approved validator version and verify a cryptographic digest or signature before execution.
- Invoke the validator through a fixed interpreter and argument array without shell interpolation.
- Run validation in a sandbox with minimal filesystem access, no unnecessary credentials, and network access disabled unless explicitly required.
- Fail closed when provenance or integrity cannot be established; do not use unvalidated evidence in conclusions.
- Document the trusted installation source, expected digest, permissions, and verification procedure directly in the skill.
