T08 · Insecure Dependencies
- Location
rules/rendering-svg-precision.md:27- Finding
Unpinned Third-Party CLI Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
rules/rendering-svg-precision.md:27
Vulnerability Type: Insecure third-party dependency execution
Risk Level: MediumVulnerable Code
bash npx svgo --precision=1 --multipass icon.svgThe same command also appears in the generated document at
AGENTS.md:2078.Technical Analysis
The guidance instructs an agent or user to execute
svgothroughnpxwithout specifying a package version or requiring resolution from a reviewed, lockfile-controlled dependency. If the package is unavailable locally,npxmay retrieve and execute it from the configured package registry.Because the resolved package version and registry content can change after this Skill is reviewed, the command introduces a supply-chain execution boundary. A compromised package release, malicious registry configuration, or dependency-resolution attack could cause attacker-controlled package or lifecycle code to run locally.
Executing an external package is not required merely to explain the recommendation to reduce SVG coordinate precision. The instruction therefore grants a third-party dependency more capability than the Skill's documentation purpose requires.
Attack Path
- A user or AI agent follows the optimization instruction.
- The agent runs
npx svgo --precision=1 --multipass icon.svg. - If no trusted local version is installed,
npxresolves the unpinned package through the configured registry. - The registry supplies a compromised or unexpectedly changed package version.
- Package installation, lifecycle, or CLI code executes with the invoking user's permissions.
- The malicious code may read or modify accessible project files, environment data, credentials, and other user-accessible resources.
This is a conditional supply-chain path; the audited artifact does not itself contain a confirmed malicious
svgopayload.Impact Assessment
Successful exploitation would provide code execution under the ...[truncated 492 chars]
- Remediation
View remediation
Remediation Suggestions
- Add a reviewed
svgoversion to the project's development dependencies and commit the package-manager lockfile. - Invoke only the lockfile-resolved local binary, for example:
bash pnpm exec svgo --precision=1 --multipass icon.svg- Avoid commands that implicitly download and execute packages during Skill use.
- In automated environments, use a trusted registry, immutable dependency versions, integrity verification, and disabled or tightly controlled package lifecycle scripts.
- Clarify that the command is optional and that SVG coordinates can instead be reviewed or adjusted manually.
- Apply the same correction to the generated copy in
AGENTS.md, preferably by regenerating it from the corrected rule source.
- Add a reviewed
