T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned Financial SDK Dependency Allows Supply-Chain Substitution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:12-17andSKILL.md:31-35
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
yaml install: - package: "@payspawn/sdk" registry: "npm" version: ">=5.3.0" source: "https://www.npmjs.com/package/@payspawn/sdk" audit: "https://github.com/adambrainai/payspawn"bash npm install @payspawn/sdkTechnical Analysis
The skill permits any version of
@payspawn/sdkequal to or newer than5.3.0, while the documented installation command installs the registry's current default version. Neither an exact version nor an artifact integrity hash is specified.This SDK operates in a financially sensitive context: it receives
PAYSPAWN_CREDENTIAL, constructs USDC payments, and communicates with external services and blockchain contracts. Consequently, a malicious or compromised future package release would execute in the agent's process with access to the credential and payment workflow.The repository and audit links do not ensure that the installed npm artifact corresponds to reviewed source code. The audited project contains no lockfile, vendored dependency, checksum, or reproducible-build verification that would constrain the installed implementation.
Attack Path
- An attacker compromises the npm publisher account, package build pipeline, or another component of the package publication process.
- The attacker publishes a malicious release that satisfies the
>=5.3.0version constraint or changes the package version selected by the unversioned installation command. - A user follows the skill instructions and runs
npm install @payspawn/sdk. - npm resolves and installs the attacker-controlled release.
- The agent imports the package and passes
PAYSPAWN_CREDENTIALto its constructor. - The malicious implementation can read or transmit that credential, manipulate recipient ...[truncated 1302 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the open-ended version range with an exact, reviewed release, such as
5.3.0, and show that exact version in the installation command:bash npm install --save-exact @payspawn/sdk@5.3.0 - Commit a package lockfile containing npm integrity metadata and require deterministic installation with
npm ci. - Verify npm package provenance, publisher identity, signatures or attestations, and correspondence between the published artifact and reviewed repository source.
- Perform dependency and source review before every intentional upgrade. Use an automated update process that requires security approval rather than accepting arbitrary future releases.
- Run the SDK in a least-privileged process or isolated container with access only to the required credential and network destinations.
- Ensure the agent process cannot read unrelated wallet keys, deployment credentials, cloud credentials, or sensitive host files.
- Configure the lowest practical daily and per-transaction limits, enforce recipient allowlists, use short credential expirations, and rotate credentials regularly.
- Monitor payment activity and maintain an independently verified emergency revocation procedure.
- Replace the open-ended version range with an exact, reviewed release, such as
