Exploiting Fortune 500 Through Hidden Supply Chain Links
The Consul UI monorepo declared internal workspace packages with wildcard versions, so package managers could resolve them from the public npm registry instead of local files. An attacker could claim those package names and run arbitrary code on developer machines or CI systems that installed dependencies.
Published on depi.security
Software Supply Chains have become increasingly complex, with countless dependencies forming the backbone of modern applications. Despite this complexity, many attacks targeting these dependencies are surprisingly simple.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the workspace package.json files used wildcard version specifiers for internal packages, and some package managers resolved those names from the public registry rather than the local workspace.
Impact
An attacker could run arbitrary code in affected development environments, but production environments and users of pre-built binaries were not affected.
What the attacker needed
Access to the Consul source repository; ability to publish packages to npm; victim installs dependencies with a vulnerable package…
How it was found
- Clone the Consul repository and change into the consul-ui package directory.
- Run pnpm install, which searches the public npm registry for the internal package name.
- Claim the package on the registry and add a preinstall script that sends host details to a server.
- Observe a pingback from an internal machine at a Fortune 500 company when its developers install dependencies.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a project lists a dependency by name and version, the package manager normally downloads it from a public registry. If an internal package is not published there, an outsider can publish a package with the same name. Then, when someone installs dependencies, the outsider's code runs on their machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.