T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:58
- Finding
- Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 58–61 **Vulnerability Type**: Unpinned and unverified third-party dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ## Dependencies - **pyhwp** (`pip install pyhwp`) — installed at `/Users/mupeng/Library/Python/3.9/lib/python/site-packages/hwp5/` - **Python 3.9+** — standard library `zipfile`, `xml.etree.ElementTree` ``` ### Technical Analysis The documented installation command resolves and installs the current version of `pyhwp` without a version constraint, package hash, lockfile, or trusted package-index restriction. Consequently, the dependency retrieved at installation time may differ from the version originally reviewed or tested. Python package installation can execute package build or installation logic. If the package, one of its transitive dependencies, or the configured package index is compromised, attacker-controlled code could run during installation. The absolute user-specific installation path also does not provide integrity assurance and may encourage reliance on an environment that has not been independently validated. This finding does not establish that `pyhwp` is malicious. The risk arises from mutable and unverified dependency resolution. ### Attack Path 1. An agent or user follows the documented `pip install pyhwp` instruction to enable HWP processing. 2. `pip` resolves the package and its transitive dependencies from the configured package index without enforcing reviewed versions or hashes. 3. An attacker compromises a relevant package release, dependency, maintainer account, or package source. 4. The malicious package is downloaded and installed. 5. Package installation logic executes with the privileges of the user running `pip`. 6. The installed code may execute again whenever the Skill processes a legacy HWP document. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the account p ...[truncated 456 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `pyhwp` and all transitive dependencies to versions that have been reviewed and tested. 2. Maintain a lockfile or requirements file containing cryptographic hashes, and install with hash enforcement, such as `pip install --require-hashes -r requirements.txt`. 3. Explicitly use a trusted package index and prevent fallback to untrusted or unexpected indexes. 4. Install the dependency in an isolated virtual environment or container under a non-privileged account. 5. Scan pinned packages for known vulnerabilities and review updates before changing the lockfile. 6. Document the supported version rather than relying on a user-specific absolute installation path. 7. Where feasible, obtain prebuilt artifacts from a controlled internal repository after integrity and provenance verification. ]]>
