T08 · Insecure Dependencies
- Location
README.md:23- Finding
Unpinned Third-Party npm Package Execution and Installation
- Content
View full analysis
Vulnerability Details
File Locations:
README.md:23-25references/architecture.md:63-69
Vulnerability Type: Unpinned and dynamically resolved third-party dependencies
Risk Level: MediumVulnerable Code
README.md:23-25:bash npx bountyswarm --help # CLI npm i bountyswarm-sdk # TypeScript SDKreferences/architecture.md:63-69:bash # CLI npx bountyswarm list npx bountyswarm create --reward 100 --deadline 7d --description "..." # SDK npm i bountyswarm-sdkTechnical Analysis
The documentation directs users to execute or install npm packages without specifying an exact, audited version or integrity value.
npx bountyswarmcan download the version currently selected by the npm registry and immediately execute its CLI code. Likewise,npm i bountyswarm-sdkdynamically resolves a package release and may execute package lifecycle scripts during installation. No lockfile, integrity hash, reviewed source reference, or lifecycle-script restriction is provided.Consequently, the code executed by users can change after this skill has been reviewed. The project itself does not contain evidence that the named packages are currently malicious; the vulnerability is the unsafe trust model and mutable supply-chain dependency.
Attack Path
- An attacker compromises the npm account, publication token, repository, or build pipeline associated with
bountyswarmorbountyswarm-sdk; alternatively, package ownership is transferred to an untrusted party. - The attacker publishes a malicious version under the same package name.
- A user follows the documented unpinned
npxornpm icommand. - npm resolves and downloads the attacker-controlled release.
- In the
npxcase, the package CLI executes immediately. In the installation case, malicious lifecycle scripts may execute during installation, or malicious SDK code executes when imported. - The pa ...[truncated 882 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every documented package to a reviewed exact version, for example:
bash npx --yes bountyswarm@1.0.0 --help npm install --save-exact bountyswarm-sdk@1.0.0 -
Commit and enforce an npm lockfile containing registry-resolved integrity hashes.
-
Publish links to the packages' verifiable source repositories and associate releases with signed tags or provenance attestations.
-
Verify package integrity and publisher identity before installation.
-
Disable lifecycle scripts where they are not required:
bash npm install --ignore-scripts --save-exact bountyswarm-sdk@1.0.0 -
Prefer installing reviewed dependencies in an isolated, least-privileged environment rather than invoking a dynamically resolved package with
npx. -
Use dependency monitoring and package allowlists in CI/CD.
-
Update both
README.mdandreferences/architecture.mdso all examples consistently use the audited version.
-
