T08 · Insecure Dependencies
- Location
SKILL.md:37- Finding
Unpinned Third-Party Packages Are Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 37 and 274
Vulnerability Type: Unpinned executable dependency
Risk Level: MediumVulnerable Code
bash pnpm dlx @browserbasehq/sdk-functions init my-functionbash # Or use npx npx @browserbasehq/sdk-functions dev index.tsTechnical Analysis
The skill instructs users to download and immediately execute
@browserbasehq/sdk-functionswithout specifying an exact, reviewed version or an integrity constraint. Bothpnpm dlxandnpxcan resolve the package from a remote registry at execution time. Consequently, the code executed by these commands may differ from the code available when the skill was audited.This creates a supply-chain trust boundary in which a compromised publisher account, malicious future package release, registry compromise, or unexpected dependency change could cause arbitrary package code or lifecycle scripts to execute locally. The risk is especially relevant because the prerequisite instructions export
BROWSERBASE_API_KEYandBROWSERBASE_PROJECT_IDinto the environment, while the development command may be run in a project containing a credential-bearing.envfile.The commands are related to the skill's declared deployment functionality, but dynamically executing an unspecified package version is broader than necessary. An exact reviewed version and lockfile would provide the required functionality with less supply-chain exposure.
Attack Path
- An attacker compromises the package publisher, registry entry, or a transitive dependency, or publishes a malicious future release.
- The user follows the skill and runs the unpinned
pnpm dlxornpxcommand. - The package manager resolves and downloads the attacker-controlled release.
- The malicious package executes with the permissions of the current local user.
- It reads accessible environment variables, project files, or
.envcredenti ...[truncated 766 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
@browserbasehq/sdk-functionsto an exact, reviewed version in every command, rather than using an implicitly resolved latest version. - Install the dependency into the project and commit a lockfile with integrity metadata before running the CLI.
- Replace ad hoc
pnpm dlxandnpxfallback execution with a package script that invokes the locked local dependency. - Review package provenance, publisher identity, release signatures or attestations, and transitive dependency changes before upgrades.
- Run initialization before exporting credentials whenever credentials are not needed for that step.
- Execute dependency installation and initialization in a restricted environment without unrelated secrets or sensitive files.
- Document an explicit upgrade and review process rather than allowing automatic resolution to future versions.
Example hardened workflow:
bash pnpm add --save-exact @browserbasehq/sdk-functions@REVIEWED_VERSION pnpm exec bb init my-functionThe exact command should be verified against the reviewed version's official CLI interface, and the resulting lockfile should be retained.
- Pin
