T08 · Insecure Dependencies
- Location
SKILL.md:188- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:188
Vulnerability Type: Unverified and unpinned package installation
Risk Level: MediumVulnerable code snippet:
markdown | flatted (optional) | Library | Optional | `npm install flatted` or `pip install flatted`, for circular references |Technical Analysis
The Skill recommends installing
flattedthrough npm or pip without specifying an exact version, lockfile, integrity hash, trusted registry, or package-verification procedure. Package names and mutable version ranges are resolved at installation time, meaning the installed artifact can differ from the artifact originally reviewed.The command is also ambiguous about the package ecosystem. Packages with the same name in different registries are not necessarily maintained by the same publisher or implemented from the same source.
Package installations can execute lifecycle or build code with the privileges of the Agent process. Consequently, compromise of a package, registry account, distribution channel, or similarly named package could convert this instruction into arbitrary local code execution.
Attack Path
- A user asks the Agent to process JSON containing circular references.
- The Agent follows the dependency guidance in
SKILL.md. - It runs
npm install flattedorpip install flattedwithout a pinned version or integrity verification. - The package manager resolves the currently available artifact from its configured registry.
- A compromised, substituted, or malicious artifact executes installation-time code or is imported during later processing.
- The artifact operates with the permissions available to the Agent or user account.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the Agent process's privileges. Depending on those privileges, the affected package could read or modify accessible project files, environment var ...[truncated 283 chars]
- Remediation
View remediation
Remediation Suggestions
- Identify the intended package ecosystem explicitly and do not present npm and pip packages as interchangeable.
- Pin a reviewed package version, such as an exact semantic version rather than the latest available release.
- Commit and enforce an ecosystem-specific lockfile.
- Verify package integrity using a trusted checksum, signature, or lockfile integrity field.
- Restrict installation to the official expected registry and verify the publisher and repository.
- Run dependency installation without administrative privileges and in an isolated environment.
- Use the documented built-in
WeakSetimplementation when replacing circular references with markers is sufficient, avoiding the dependency entirely. - Add dependency vulnerability and provenance checks to the review or CI process.
