T08 · Insecure Dependencies
- Location
SKILL.md:91- Finding
Unpinned Third-Party Dependencies Permit Supply-Chain Substitution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:91andREADME.md:61
Vulnerability Type: Unpinned dependency installation
Risk Level: MediumVulnerable Code
SKILL.md:91:bash pip install latex2mathml mathml2omml python-docx matplotlibREADME.md:61:bash pip install latex2mathml mathml2omml python-docx matplotlibTechnical Analysis
The documented installation command retrieves four Python packages without exact version constraints or cryptographic hashes. Although
THIRD_PARTY.mdidentifies expected version families, those declarations are not enforced by the installation command.Consequently, package resolution depends on the mutable state of the configured Python package index at installation time. A compromised upstream release, compromised package index, or malicious package served through an incorrectly configured index could be installed without a reproducible integrity check. Python packages may execute build backend or installation logic during installation, and their code is subsequently imported by
scripts/latex2docx.py.No evidence indicates that the currently named dependencies are malicious. The vulnerability is the absence of controls ensuring that users receive the reviewed dependency versions.
Attack Path
- An attacker compromises an upstream dependency release or a package index configured in the victim's pip environment.
- The victim or Agent follows the documented unpinned
pip installcommand. - Pip resolves the attacker-controlled package version because no exact version or hash is required.
- Malicious code executes through package build or installation behavior, or later when
latex2docx.pyimports the installed package. - The malicious dependency operates with the privileges of the user running pip or the conversion script.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the install ...[truncated 484 chars]
- Remediation
View remediation
Remediation Suggestions
-
Create a reviewed lock file or requirements file containing exact versions, for example:
text latex2mathml==<reviewed-version> mathml2omml==<reviewed-version> python-docx==<reviewed-version> matplotlib==<reviewed-version> -
Generate and record SHA-256 hashes for every package and transitive dependency, then require them during installation:
bash python -m pip install --require-hashes -r requirements.txt -
Pin transitive dependencies as well as direct dependencies so that the complete environment is reproducible.
-
Use an explicitly trusted package index or an internally controlled artifact repository rather than inheriting an unknown pip configuration.
-
Review dependency updates before changing pins, including package ownership, release history, source changes, and published artifacts.
-
Run installation and conversion with a non-privileged account in a sandbox with restricted filesystem and network access.
-
Update both
SKILL.mdandREADME.mdto reference the secured requirements or lock file instead of installing unconstrained package names.
-
