T08 · Insecure Dependencies
- Location
SKILL.md:30- Finding
Unpinned Third-Party Package Is Downloaded and Executed Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 30
Vulnerability Type: Supply-chain exposure through unpinned package execution
Risk Level: MediumComplete Code Snippet:
text npx aihaoji-openclaw setupTechnical Analysis
The fallback setup procedure invokes an npm package through
npxwithout specifying an exact version or integrity value. If the package is not already available locally,npxcan retrieve it from the configured npm registry and immediately execute its entry point with the privileges of the current user.Because the package version is not pinned, the code executed during setup can change after this Skill has been reviewed. A compromised publisher account, malicious future release, registry compromise, or dependency compromise could therefore turn the documented setup command into arbitrary local code execution. The audited project does not include the package source or provide a checksum that would allow the downloaded artifact to be verified.
Attack Path
- An attacker compromises the
aihaoji-openclawpackage, its publisher account, or a transitive dependency used by a newly published version. - A user encounters automatic configuration failure and follows the documented fallback procedure.
npxresolves and downloads the current package version from the configured registry.- The downloaded package executes before the user can inspect its effective implementation.
- Malicious installation or runtime code executes with the permissions of the user running the Agent.
Impact Assessment
Successful exploitation could execute arbitrary commands under the invoking user's account. This may permit access to files readable by that user, including the Aihaoji API configuration and other user credentials, modification of user-owned files, network communication, and installation of user-level persistence. It does not directly grant administrator privileges unl ...[truncated 114 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the package to a specific reviewed version, for example
npx --yes aihaoji-openclaw@X.Y.Z setup. - Verify the selected release, publisher identity, provenance, and transitive dependency tree before recommending execution.
- Use npm integrity metadata or a separately published trusted checksum where possible.
- Prefer installing from a documented official package scope and an explicitly trusted registry.
- Avoid automatically executing downloaded setup tools. Provide a manual setup procedure as the primary fallback.
- Run setup with ordinary user privileges and clearly warn users not to invoke it through
sudoor another elevated context. - Periodically re-audit the pinned version before updating the documented command.
- Pin the package to a specific reviewed version, for example
