T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:17- Finding
Unverified Remote CLI Download and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:17-20, 47-57, 139-140
Vulnerability Type: Remote payload retrieval and insecure dependency execution
Risk Level: CriticalVulnerable Code
text This skill does NOT ship its own Quark Cloud Drive implementation. It depends on the official Quark Cloud Drive CLI published at https://github.com/quark-clouddrive/quarkclouddrive_offical. The helper files `scripts/quark-drive.cjs` and `scripts/install.sh` are thin wrappers that download and invoke that official CLI. - Before invoking any `node scripts/quark-drive.cjs ...` command, confirm the scripts exist. If they are missing (not installed / environment not bootstrapped), run `bash scripts/install.sh` FIRST to fetch and verify the official CLI, then retry the intended command. - `bash scripts/install.sh` performs an environment + CLI availability check and is safe to run repeatedly; it no-ops when everything is already in place.bash curl -s "https://api.github.com/repos/quark-clouddrive/quarkclouddrive_offical/releases/latest" | grep -o '"tag_name":[^,]*'text 2. Extract the ".zip" "browser_download_url" from the latest Release assets. Download and unzip. 3. Fallback (only if step 1 fails): `https://pdds.quark.cn/download/stfile/bbhhdeegcbcfbdjdp/quarkclouddrive-1.0.15.zip` 4. Install self-check: `bash scripts/install.sh` → confirm `node scripts/quark-drive.cjs --help` works.Technical Analysis
The Skill resolves a mutable
latestrelease, downloads a ZIP archive, extracts it, and executes the resulting installer and Node.js CLI. No fixed version, cryptographic checksum, signature, trusted key, or immutable commit is specified.The repository also does not contain the referenced
scripts/install.shorscripts/quark-drive.cjsfiles. Consequently, their claimed verification logic and runtime behavior cannot be reviewed from the supplied artifact. Trust is transferred to code ...[truncated 1461 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version and immutable release artifact.
- Publish and enforce a SHA-256 or stronger digest for every downloaded file.
- Require verification of a cryptographic signature against a bundled, trusted public key before extraction or execution.
- Bundle the wrapper and verification scripts in the Skill so their complete behavior can be audited.
- Reject unexpected redirects, filenames, archive contents, and download hosts.
- Extract into a newly created restricted temporary directory and prevent archive path traversal.
- Run the CLI in a sandbox with narrowly scoped filesystem and network access.
- Display the exact version, origin, and digest to the user and obtain approval before first installation.
- Avoid mutable
latestresolution and do not execute unpinned packages throughnpx.
