T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:24- Finding
Unresolved CLI Executable Allows Tool Hijacking Through PATH Spoofing
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:24-34,55
Vulnerability Type: Untrusted executable resolution and missing referenced implementation
Risk Level: MediumVulnerable Code Snippet
text `icosmos-shopify setup once` `icosmos-shopify stores list` `icosmos-shopify content shop --store xxx.myshopify.com` `icosmos-shopify content products list --store xxx.myshopify.com --first 20 --after <cursor>` `icosmos-shopify content orders list --store xxx.myshopify.com --start <RFC3339> --end <RFC3339>` `icosmos-shopify content blogs list --store xxx.myshopify.com` `icosmos-shopify content blogs articles list --store xxx.myshopify.com --blog-id 123` `icosmos-shopify audit theme --store xxx.myshopify.com` `icosmos-shopify audit products --store xxx.myshopify.com --limit 50` `icosmos-shopify test checkout --store xxx.myshopify.com` `icosmos-shopify audit metrics --store xxx.myshopify.com --days 7` `icosmos-shopify blog publish --store xxx.myshopify.com --blog-id 123 --title ... --body-file article.html --confirm` [icosmos-shopify](icosmos-shopify)Technical Analysis
The skill directs the agent to invoke
icosmos-shopifyby its bare executable name. It also states that the tool is available in the current directory through a relative link, but the audited project contains onlySKILL.md; the referenced executable is absent.When a bare command is passed to a shell or process launcher, executable resolution generally depends on the active
PATH. Because the expected executable is not included in the package and no absolute or verified relative path is enforced, another executable namedicosmos-shopifycan be selected. This creates a tool-spoofing opportunity in environments where an attacker can influencePATHor write to an earlier searched directory.The setup operation is especially sensitive because the skill specifies that
ICOSMOS_USER_EMAILand `ICOSMOS_US ...[truncated 2515 chars]- Remediation
View remediation
Remediation Suggestions
- Include the referenced
icosmos-shopifyimplementation in the package so its behavior can be audited. - Invoke the tool through a canonical, explicit path resolved relative to the trusted skill directory rather than relying on a bare command name or the caller's current working directory.
- Verify the executable before launch using a pinned cryptographic hash, authenticated package signature, or equivalent integrity control.
- Reject execution if the expected executable is absent, is a symbolic link to an untrusted location, has unexpected ownership or permissions, or fails integrity verification.
- Launch the tool with a minimal, controlled
PATHand a sanitized environment. Pass credentials only to the specific trusted process that requires them. - Store cached Shopify tokens in an operating-system credential store or an encrypted file with restrictive permissions instead of an unspecified local cache.
- Document and restrict the network endpoints contacted during setup, including the expected Supabase and Shopify hosts.
- Add automated tests confirming token redaction, sensitive-order-field suppression, read-only operation of audit commands, and mandatory
--confirmenforcement for publication. - Pin the tool version and record its provenance so deployments cannot silently substitute another implementation.
- Include the referenced
