T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:6- Finding
Dynamic Execution of an Unverified External Validator
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 6
Vulnerability Type:T07: Tool Hijacking and Spoofing
Risk Level: MediumVulnerable 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. Report output follows `references/reporting.md`.Technical Analysis
The Skill directs the agent to dynamically locate an “active skills root” and execute
groundcrew-doctor.pyfrom a.groundcrewsubdirectory outside the audited package. It does not define a canonical trusted root, pin the validator version or cryptographic digest, verify its signature or ownership, or otherwise authenticate the discovered executable.This creates a local tool-substitution boundary: a malicious or compromised file placed at the expected path can impersonate the legitimate evidence validator. Invocation would execute that file with the privileges and environment of the agent process.
The finding does not establish that the current validator is malicious; the vulnerability is the unauthenticated discovery and execution mechanism.
Attack Path
- An attacker gains write access to a directory that may be selected as the active skills root.
- The attacker creates or replaces
.groundcrew/groundcrew-doctor.pywith malicious code while preserving the expected filename and interface. - A user invokes the
growSkill with evidence that requires validation. - The agent follows
SKILL.mdline 6, discovers the attacker-controlled skills root, and runs the spoofed validator. - The malicious process executes with the agent's permissions and can access resources available to that process. It ...[truncated 672 chars]
- Remediation
View remediation
Remediation Suggestions
- Package the validator inside the reviewed Skill distribution or resolve it from a single canonical installation directory that untrusted users cannot modify.
- Pin an approved validator version and verify a cryptographic digest or trusted digital signature before every execution.
- Validate file ownership and permissions, reject symbolic links and unexpected path traversal, and resolve the final canonical path before invocation.
- Fail closed if the validator's provenance or integrity cannot be established.
- Execute the validator with least privilege in a restricted environment, exposing only the required evidence file and removing unnecessary credentials and environment variables.
- Disable network access for validation unless explicitly required and documented.
- Prefer a structured, non-executable validation implementation integrated into the trusted runtime when practical.
- Record the resolved validator path, version, and integrity result in the audit trail without logging secrets.
