T03 · Remote Payload Retrieval and Execution
- Location
scripts/install_cli.ps1:178- Finding
Unauthenticated Remote Release Payload Retrieval and Execution
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install_cli.ps1, lines 178-274
Vulnerability Type:T03: Remote Payload Retrieval and Execution
Risk Level: MediumThe installer downloads an executable archive and its checksum from the same externally controlled GitHub release channel. It then executes the downloaded binary to validate its command-line interface.
powershell $archiveName = "maya_umbrella_scanner-$Version.zip" $checksumName = "SHA256SUMS" $releaseBase = "https://github.com/loonghao/maya_umbrella_scanner/releases/download/v$Version" $archiveUrl = "$releaseBase/$archiveName" $checksumUrl = "$releaseBase/$checksumName" $archivePath = Join-Path $temporaryRoot $archiveName $checksumPath = Join-Path $temporaryRoot $checksumName $stagingDirectory = Join-Path $temporaryRoot "payload" # GitHub requires TLS 1.2; Windows PowerShell 5.1 can otherwise inherit an older default. [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -UseBasicParsing -Uri $checksumUrl -OutFile $checksumPath | Out-Null Invoke-WebRequest -UseBasicParsing -Uri $archiveUrl -OutFile $archivePath | Out-Null if ((Get-Item -LiteralPath $checksumPath).Length -le 0) { throw "Downloaded SHA256SUMS is empty." } if ((Get-Item -LiteralPath $archivePath).Length -le 0) { throw "Downloaded release archive is empty." } $checksumPattern = '^(?<hash>[0-9A-Fa-f]{64})[ \t]+\*?(?<name>' + [System.Text.RegularExpressions.Regex]::Escape($archiveName) + ')$' $checksumMatches = @() foreach ($line in [System.IO.File]::ReadAllLines($checksumPath)) { $match = [System.Text.RegularExpressions.Regex]::Match( $line, $checksumPattern, [System.Text.RegularExpressions.RegexOptions]::CultureInvariant ) if ($match.Success) { $checksumMatc ...[truncated 5511 chars]- Remediation
View remediation
Remediation Suggestions
- Verify releases using a cryptographically signed manifest whose public verification key or certificate identity is pinned in the reviewed Skill package.
- Alternatively, maintain an allowlist of approved version-to-SHA-256 mappings in a trusted, locally reviewed manifest rather than downloading the expected checksum from the same release.
- Validate the executable's Authenticode signature and require an explicitly pinned signer certificate or public-key identity before invoking it.
- Perform all signature, certificate-chain, revocation, artifact-hash, archive-structure, and expected-file checks before the first execution of any extracted binary.
- Reject unsigned payloads, unexpected signers, expired or revoked certificates, unlisted versions, and hash mismatches without offering a bypass.
- Where feasible, publish immutable release attestations through a separate trust channel and verify provenance using a framework such as Sigstore or SLSA-compatible attestations.
- Retain the existing exact-version requirement, non-elevated execution, ZIP traversal protections, reparse-point checks, no-clobber installation behavior, and CLI contract validation as defense-in-depth controls.
