T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:77- Finding
Unbundled Relative Script Entry Points Can Execute Attacker-Controlled Code
- Content
View full analysis
Vulnerability Details
File Locations:
SKILL.md, lines 77-91README.md, lines 23-31INSTALL.md, lines 24-30
Vulnerability Type: T07: Tool Hijacking and Spoofing
Risk Level: HighVulnerable Code
SKILL.md, lines 77-91:markdown ## Project Scripts - `scripts/pbft-claim-rewards-profile-method.mjs` - `scripts/pbft-claim-rewards-quick.mjs` - `scripts/pbft-claim-three-address-rewards.mjs` ## Script Entry Points - Preferred profile path: `scripts/pbft-claim-rewards-profile-method.mjs` - Fast one-click path: `scripts/pbft-claim-rewards-quick.mjs` - Deep scan path: `scripts/pbft-claim-three-address-rewards.mjs` - `node scripts/pbft-claim-rewards-profile-method.mjs --help` - `node scripts/pbft-claim-rewards-profile-method.mjs --dry-run` - `node scripts/pbft-claim-rewards-quick.mjs --dry-run` - `node scripts/pbft-claim-three-address-rewards.mjs --dry-run`README.md, lines 23-31:markdown Script entry: - `scripts/pbft-claim-rewards-profile-method.mjs` - `scripts/pbft-claim-rewards-quick.mjs` - `node scripts/pbft-claim-rewards-profile-method.mjs --help` - `node scripts/pbft-claim-rewards-profile-method.mjs --dry-run` - `node scripts/pbft-claim-rewards-quick.mjs --dry-run`INSTALL.md, lines 24-30:markdown If the local project scripts are available, verify the public entrypoints first: ```bash node scripts/pbft-claim-rewards-profile-method.mjs --help node scripts/pbft-claim-rewards-profile-method.mjs --dry-run node scripts/pbft-claim-rewards-quick.mjs --dry-runtext ### Technical Analysis The audited package contains only documentation and metadata files; it does not contain the referenced `scripts/` directory or any of the advertised JavaScript entry points. Nevertheless, the Skill repeatedly directs the agent or operator to execute those scripts using paths relative to the current working directory. Relative path resoluti ...[truncated 2577 chars]- Remediation
View remediation
Remediation Suggestions
- Bundle every required JavaScript entry point inside the published Skill package so its implementation can be audited together with the instructions.
- Resolve executable paths from a trusted, immutable Skill installation directory rather than from the current working directory.
- Before execution, verify that the resolved path remains within the expected Skill directory and is a regular file rather than a symbolic link.
- Publish cryptographic checksums or signed release artifacts and verify script integrity before invocation.
- Pin installation instructions to a trusted repository and immutable commit or release instead of relying on unspecified local project files.
- Treat
--helpand--dry-runas potentially executable operations; run them only after source and integrity validation. - Document and validate the expected chain ID, RPC endpoint, contract addresses, claim function selectors, and transaction recipients.
- Require explicit user review and approval of transaction destination, contract, value, calldata, network, gas parameters, and signer before broadcasting.
- Run claim tooling with least privilege and avoid exposing unrelated credentials, wallet secrets, or unrestricted filesystem access.
- Fail closed when the bundled and verified scripts are unavailable instead of searching the current project for similarly named files.
