T03 · Remote Payload Retrieval and Execution
- Location
references/DEPLOYMENT_GUIDE.md:633- Finding
Unverified Release Archive Is Downloaded and Executed During Upgrade
- Content
View full analysis
Vulnerability Details
File Location:
references/DEPLOYMENT_GUIDE.md:633-646
Vulnerability Type: Unauthenticated remote payload retrieval and execution
Risk Level: HighVulnerable Code
bash # 2. Download the new version wget https://github.com/your-org/hermes-system/releases/download/v1.0.1/hermes-system-1.0.1.tar.gz # 3. Stop the service ./bin/hermes-stop # 4. Extract the new version tar -xzf hermes-system-1.0.1.tar.gz cd hermes-system-1.0.1 # 5. Run the upgrade script ./bin/hermes-upgrade --from 1.0.0 --to 1.0.1 # 6. Start the service ./bin/hermes-startTechnical Analysis
The documented upgrade procedure downloads a release archive from a placeholder GitHub organization, extracts it, and executes scripts from the archive without verifying a cryptographic signature or a pinned checksum.
HTTPS protects the connection in transit but does not establish that the release itself is the expected audited artifact. The effective payload can change after this Skill package has been reviewed. The use of the placeholder namespace
your-orgfurther prevents users from establishing that the download originates from the declared project publisher.Although an earlier installation example mentions GPG verification, this upgrade path does not perform that verification. It also does not specify a trusted signing-key fingerprint or a pinned archive digest.
Attack Path
- An attacker gains control of the referenced repository, release process, organization namespace, or release credentials.
- The attacker replaces the
hermes-system-1.0.1.tar.gzrelease with an archive containing malicioushermes-upgradeorhermes-startscripts. - An administrator follows the documented upgrade procedure.
wgetretrieves the attacker-controlled archive.tarextracts the payload without validating its identity or checking archive paths.- The administrator executes `./bin/hermes- ...[truncated 922 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the placeholder
your-orgURL with the verified, publisher-controlled repository. - Publish a SHA-256 or stronger digest through a separately authenticated release channel.
- Verify the digest before extraction and fail closed on any mismatch:
bash wget --https-only --secure-protocol=TLSv1_2 \ https://github.com/VERIFIED-ORG/hermes-system/releases/download/v1.0.1/hermes-system-1.0.1.tar.gz echo "PINNED_SHA256 hermes-system-1.0.1.tar.gz" | sha256sum --check - - Sign every release and document the expected signing-key fingerprint. Importing an arbitrary key from the same release location is insufficient.
- Require both signature and checksum verification before executing any downloaded script.
- Inspect archive entries before extraction and reject absolute paths, parent-directory traversal, symlinks to sensitive locations, and unexpected executable files.
- Perform upgrades under a dedicated, least-privileged service account with write access limited to the required installation and data directories.
- Pin immutable release identifiers and protect the publisher’s release workflow with branch protection, reviewed builds, artifact attestations, and short-lived publishing credentials.
- Replace the placeholder
