T08 · Insecure Dependencies
- Location
SKILL.md:100- Finding
Unverified Installation Archive Is Extracted and Executed with Elevated Privileges
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:100-120, 171-186; duplicated workflow inreferences/installation_guide.md:43-56, 105-120
Vulnerability Type: Untrusted software supply chain and unsafe privileged execution
Risk Level: HighVulnerable Code
From
SKILL.md:100-120:bash # Check if the installation package exists if [ ! -f "$INSTALL_PACKAGE_PATH" ]; then echo "Error: Installation package does not exist, please check if the path is correct" exit 1 fi # Check filename format if [[ "$(basename $INSTALL_PACKAGE_PATH)" != KaiwuDB*.tar.gz ]]; then echo "Error: Installation package filename is incorrect. It should be a tar.gz file with KaiwuDB as the prefix" exit 1 fi # Create installation directory sudo mkdir -p /opt/kaiwudb # Extract installation package tar -xzf "$INSTALL_PACKAGE_PATH" -C /opt/kaiwudb # Enter installation directory cd /opt/kaiwudb/kaiwudb_installFrom
SKILL.md:171-186:bash # Single-node deployment ./deploy.sh install --single # Single-replica cluster deployment ./deploy.sh install --single-replica # Multi-replica cluster deployment ./deploy.sh install --multi-replicaThe same unsafe trust model appears in
references/installation_guide.md:43-56, 105-120:bash sudo mkdir -p /opt/kaiwudb tar -xzf "$INSTALL_PACKAGE_PATH" -C /opt/kaiwudb cd /opt/kaiwudb/$(basename "$INSTALL_PACKAGE_PATH" .tar.gz) ./deploy.sh install --single ./deploy.sh install --single-replica ./deploy.sh install --multi-replicaTechnical Analysis
The workflow validates only that the supplied path exists and that its basename matches
KaiwuDB*.tar.gz. A filename pattern does not establish the archive's authenticity, integrity, provenance, or safety.The instructions do not require any of the following before execution:
- Verification of a vendor signature or trusted cryptographic digest.
- Confirmat ...[truncated 2519 chars]
- Remediation
View remediation
Remediation Suggestions
-
Require authenticated package provenance
- Accept packages only from an allowlisted official KaiwuDB source over authenticated HTTPS.
- Do not treat a user-provided filename as proof of origin.
-
Verify package integrity and authenticity
- Require a vendor-provided digital signature and verify it against a pinned trusted public key.
- Alternatively, require an approved SHA-256 or stronger digest obtained through a separate trusted channel.
- Abort deployment if verification fails or verification material is unavailable.
-
Validate archive contents before extraction
- List and inspect all archive members first.
- Reject absolute paths,
..traversal components, device files, unexpected hard links, and symbolic links escaping the staging directory. - Enforce an allowlist of expected top-level directories and installation files.
-
Use a restricted staging directory
- Extract into a newly created directory owned by an unprivileged deployment account.
- Apply restrictive permissions and ensure the destination is not shared or writable by other users.
- Move only validated files into
/opt/kaiwudb.
-
Review executable content
- Confirm the digest or signature of
deploy.shindependently. - Display the verified package version and publisher to the user before execution.
- Refuse execution if the script or archive changes after verification.
- Confirm the digest or signature of
-
Minimize privileges
- Run validation and extraction without root privileges.
- Elevate only individual operations that demonstrably require administrative access.
- Avoid running the entire vendor deployment script as root when narrower sudo rules or a dedicated service account can satisfy the task.
-
Apply the same controls consistently
- Update both
SKILL.mdandreferences/installation_guide.mdso the secondary guide cannot bypass the hardened workflow.
- Update both
-
