T03 · Remote Payload Retrieval and Execution
- Location
references/配图生成最佳实践.md:41- Finding
Unverified Remote Installer Executed Directly Through a Shell
- Content
View full analysis
Vulnerability Details
File Location:
references/配图生成最佳实践.md:41-44; duplicated inreferences/图表工具调研报告.md:66
Vulnerability Type: Unverified remote code retrieval and execution
Risk Level: CriticalVulnerable Code:
bash ### D2 installation curl -fsSL https://d2lang.com/install.sh | sh -s --Technical Analysis
The documentation instructs the user or Agent to download a mutable script from an external server and pipe it directly into a shell. The script is neither pinned to an immutable version nor verified using a cryptographic hash or signature before execution.
This collapses download, trust assessment, and execution into one operation. The effective payload can consequently change after the Skill has been reviewed. Compromise of the hosting server, its distribution infrastructure, DNS resolution, or the TLS trust path could result in arbitrary commands being executed with the invoking user's privileges.
D2 is presented as an optional diagramming alternative rather than a mandatory component of the primary Excalidraw-based workflow. Direct shell execution of its remote installer therefore exceeds the minimum privileges and supply-chain exposure necessary for the Skill's declared document-generation functionality.
Attack Path
- An attacker compromises the installer host, distribution path, or an authorized release account.
- The attacker modifies the response returned by
https://d2lang.com/install.sh. - A user or Agent follows the Skill's installation instructions.
curlretrieves the attacker-controlled response.- The pipe passes the response directly to
shwithout inspection or integrity verification. - The malicious commands execute with all permissions available to the invoking account.
- The payload may access project source code, user documents, credentials available to the process, or other files writable by that account.
Impact Assessment
Successfu ...[truncated 365 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all
curl | shinstallation instructions, including the duplicate inreferences/图表工具调研报告.md. - Prefer an official, version-pinned package-manager installation method.
- If a standalone artifact is necessary:
- Pin an immutable release version.
- Download the artifact as a separate step.
- Obtain the expected SHA-256 digest or signature through an independently authenticated channel.
- Verify the artifact before execution.
- Inspect the installer and execute it only after explicit user approval.
- Do not invoke the installer with administrative privileges unless strictly required.
- Keep D2 optional and use the already bundled local rendering workflow where possible.
- Remove all
