T03 · Remote Payload Retrieval and Execution
- Location
README.md:18- Finding
Unverified Remote Installer Is Piped Directly into a Shell
- Content
View full analysis
Vulnerability Details
File Location:
README.md:18-21; duplicated inREADME_zh.md:20-23
Vulnerability Type: Remote code retrieval and immediate execution
Risk Level: HighVulnerable Code:
bash curl -fsSL https://d2lang.com/install.sh | sh -s -- # TALA is a powerful diagram layout engine specifically designed for software architecture diagrams. It requires separate installation. curl -fsSL https://d2lang.com/install.sh | sh -s -- --talaThe Chinese README contains equivalent commands:
bash curl -fsSL https://d2lang.com/install.sh | sh -s -- # TALA is a powerful diagram layout engine specifically designed for software architecture diagrams. It requires separate installation. curl -fsSL https://d2lang.com/install.sh | sh -s -- --talaTechnical Analysis
These instructions download a mutable remote response and immediately pass it to
sh. Users are not given an opportunity to inspect the installer, and no version pin, cryptographic checksum, or publisher-signature verification is performed.The D2 command-line tool is needed for validation and image export, but executing an unverified remote script is not necessary for the Skill's core diagram-generation functionality and does not follow least-privilege supply-chain practices. Repository review cannot establish what code these commands will execute in the future.
HTTPS protects transport under normal conditions but does not protect against compromise of the hosting origin, an improperly issued certificate, malicious changes by an upstream maintainer, or a compromised delivery pipeline.
Attack Path
- A user follows the dependency-installation instructions.
- The
curlprocess retrieves the current content ofhttps://d2lang.com/install.sh. - The remote origin, delivery infrastructure, or installer content has been compromised or maliciously modified.
- Because the response is piped directly into
sh, the mod ...[truncated 817 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
curl | shinstructions with an official package-manager installation method using a pinned package version. - If direct downloads are unavoidable, download a versioned release artifact to disk rather than executing a mutable URL:
- Pin an explicit release version.
- Obtain the expected checksum through a separately authenticated channel.
- Verify a cryptographic signature or SHA-256 checksum.
- Inspect the downloaded installer before executing it.
- Document the exact files, directories, and permissions used by the installer.
- Keep Tala installation clearly optional and recommend Dagre or ELK when Tala-specific functionality is unnecessary.
- Apply the same corrections to both
README.mdandREADME_zh.md.
- Replace
