GHSA-vx52-2968-3vc6: pnpm: Environment secrets exfiltrated via env-placeholder expansion in proxy settings read from an untrusted pnpm-workspace.yaml
pnpm expands ${VAR} environment placeholders in the httpProxy / httpsProxy / noProxy settings read from a project’s pnpm-workspace.yaml. Because a project manifest is repository-controlled, a malicious repository that a victim merely clones and runs pnpm install in can route all install traffic through an attacker proxy whose hostname or userinfo embeds — and thereby exfiltrates — an environment secret such as NPM_TOKEN or GITHUB_TOKEN.
This bypasses a trust boundary pnpm deliberately enforces: env-placeholder expansion of request-destination settings is already suppressed for registry, pnprServer, registries and namedRegistries when they come from an untrusted project manifest, and the sibling .npmrc reader already classifies the proxy keys as request destinations. The manifest-side guard set simply omitted them.
References
- github.com/advisories/GHSA-vx52-2968-3vc6
- github.com/orgs/pnpm/discussions/13598
- github.com/pnpm/pnpm/commit/36928beae9afb64a2a6a1221df54e66d361320c8
- github.com/pnpm/pnpm/commit/5a4daec4bd5f0170b18ae053aff093eea56368ba
- github.com/pnpm/pnpm/pull/12871
- github.com/pnpm/pnpm/pull/12898
- github.com/pnpm/pnpm/releases/tag/v10.34.5
- github.com/pnpm/pnpm/releases/tag/v11.11.0
- github.com/pnpm/pnpm/security/advisories/GHSA-vx52-2968-3vc6
Code Behaviors & Features
Detect and mitigate GHSA-vx52-2968-3vc6 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →