T08 · Insecure Dependencies
- Location
SKILL.md:64- Finding
Unpinned Runtime Installation of a Third-Party Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 64-67
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable snippet:
bash # Install the dependency if it is not installed npm install pptxgenjs --prefix /tmp/pptx-pkgTechnical Analysis
The Skill instructs the agent to install
pptxgenjsat runtime without specifying an exact version, lockfile, or expected integrity hash. Consequently, the package version and transitive dependency graph resolved during execution can differ from those reviewed during the Skill audit.By default, npm packages can execute lifecycle scripts during installation. If the package, one of its transitive dependencies, or the relevant package-distribution channel is compromised, attacker-controlled installation code could execute with the permissions of the agent process. The temporary installation prefix does not prevent lifecycle scripts or subsequently imported package code from accessing other resources available to that process.
Attack Path
- An attacker compromises the
pptxgenjspackage, a transitive dependency, or its distribution channel. - The user invokes the annual-report generation workflow on a system where the dependency is not already installed.
- The agent runs the documented unpinned
npm installcommand. - npm resolves and downloads the currently published package graph rather than a previously audited graph.
- Malicious lifecycle code can run during installation, or malicious library code can run when the generated Node.js script imports the package.
- The payload operates with the permissions and resource access of the agent process.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the agent's operating-system account. The affected scope may include generated presentations, user-provided business information, temporary files, environment variab ...[truncated 353 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
pptxgenjsto an exact reviewed version rather than resolving the latest version at runtime. - Maintain a reviewed
package-lock.jsonand usenpm cito enforce the locked dependency graph. - Verify package integrity using the lockfile's integrity metadata or an independently maintained checksum.
- Use
--ignore-scriptswhen package lifecycle scripts are unnecessary. - Install dependencies during a controlled build or provisioning stage instead of during each Skill invocation.
- Use a trusted internal registry or allowlist packages and versions where possible.
- Run presentation generation in a sandbox with minimal filesystem, environment-variable, credential, tool, and network access.
- Periodically scan the pinned direct and transitive dependencies for known vulnerabilities and review updates before deployment.
- Pin
