T03 · Remote Payload Retrieval and Execution
- Location
install.js:54- Finding
Unverified Remote Native Binary Download and Installation
- Content
View full analysis
Vulnerability Details
File Location:
install.js:54-70; lifecycle registration atpackage.json:20-22
Vulnerability Type: Unverified remote payload retrieval and installation
Risk Level: HighVulnerable Code
javascript // 4. Download from GitHub Releases const tarName = `${assetName}.tar.gz`; const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${tarName}`; const installDir = path.join(os.homedir(), '.local', 'bin'); const installPath = path.join(installDir, 'rescueclaw'); console.log(`📦 Downloading ${assetName} v${VERSION}...`); console.log(` From: ${url}`); fs.mkdirSync(installDir, { recursive: true }); const tmpFile = path.join(os.tmpdir(), tarName); try { execSync(`curl -fsSL "${url}" -o "${tmpFile}"`, { stdio: 'inherit', timeout: 60000 }); execSync(`tar xzf "${tmpFile}" -C "${installDir}"`, { stdio: 'inherit' }); fs.chmodSync(installPath, 0o755);The download occurs automatically through the package lifecycle configuration:
json "clawhub": { "category": "safety", "postInstall": "install.js" }Technical Analysis
The post-install hook retrieves a platform-specific native executable from a GitHub release and installs it into
~/.local/bin. Although the release URL includes version0.2.0and HTTPS protects the connection in transit, the installer does not verify a cryptographic checksum, trusted signature, or authenticated manifest before installing the executable.A versioned GitHub release URL is not equivalent to immutable, content-addressed pinning. If the repository, release asset, maintainer account, or release workflow is compromised, the remotely hosted archive can be replaced while retaining the expected URL. The package would then install content that was not present during review.
This behavior exceeds the minimum privileges required by the local JavaScript checkpoint API, which primarily writes and removes a ...[truncated 1715 chars]
- Remediation
View remediation
Remediation Suggestions
- Publish a SHA-256 or stronger digest for every platform archive through a separately authenticated and reviewable channel.
- Embed the expected digest for the exact release artifact in the reviewed package and verify it before extraction.
- Prefer signed release manifests and verify signatures against a pinned maintainer or project public key.
- Fail closed if verification cannot be completed; do not install or execute unverifiable content.
- Require explicit user approval before downloading and installing a native executable during package installation.
- Consider bundling the auditable executable in the package if package size and platform support permit it.
- Ensure the bundled or downloaded binary source is reproducible and independently reviewable.
- Document the automatic network download accurately, including the source, installed files, integrity controls, and execution lifecycle.
