T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:30- Finding
Mutable Remote Repository Retrieved and Executed Without Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30–34
Vulnerability Type: Remote payload retrieval and execution
Risk Level: Highbash git clone https://github.com/wanyview1/Matrix-BNUHS.git cd Matrix-BNUHS # Install dependencies npm installTechnical Analysis
The Skill instructs users to clone an externally hosted repository and immediately run
npm installinside it. The repository is not pinned to a reviewed commit or immutable release, and its contents are not included in the audited artifact. Consequently, the effective code executed by these instructions can change after the Skill has been reviewed.Running
npm installcan execute package lifecycle scripts such aspreinstall,install, andpostinstall. It may also execute scripts defined by the cloned repository itself. A malicious or compromised repository can therefore run arbitrary commands under the invoking user's account.Attack Path
- An attacker compromises the referenced GitHub account, repository, or one of its write-authorized contributors.
- The attacker adds malicious package lifecycle scripts or changes dependency declarations and lockfiles.
- A user follows the Skill instructions and clones the current repository state.
- The user executes
npm install. - npm executes attacker-controlled lifecycle code with the user's privileges.
Impact Assessment
Successful exploitation can provide arbitrary code execution with the privileges of the user running npm. Depending on the local environment, the payload could access project files, environment variables, developer credentials, SSH configuration, npm tokens, browser-accessible data, and other files available to that account. It could also modify user-owned files or install additional user-level components.
The audited artifact does not itself contain or automatically execute a malicious payload. The risk arises from delegating execution to mut ...[truncated 36 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the repository to a reviewed commit hash rather than using the mutable default branch.
- Include the required application source in the Skill package when feasible so it can be audited together with the instructions.
- Verify downloaded source against a documented cryptographic checksum or signed release.
- Commit and review an npm lockfile, then use
npm cirather than unconstrainednpm install. - Use
npm ci --ignore-scriptswhen package lifecycle scripts are unnecessary. - If lifecycle scripts are required, document and review each script before allowing execution.
- Run installation in an isolated, least-privileged environment without production credentials or access to sensitive host files.
