GHSA-G4W7-2Q9V-H6Q2
Windows: executables in the scanned repository run in place of git, go, node or dotnet
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-G4W7-2Q9V-H6Q2 divulgada · CVSS 8.8 (GitHub) | |
| Remediación | Parche 12.9.2 | @cyclonedx/cdxgen · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
On Windows, a scanned repository that ships its own `git.exe`, `go.exe`, `node.cmd` or `dotnet.cmd` can get that file started by cdxgen in place of the real tool, with the rights of the user or CI job running the scan. For the git, go and node cases this also holds with `--no-install-deps` and in secure mode. The broadest route is `git.exe`: when formulation is collected, cdxgen runs git with the repository as the working directory in every scan type.
Details
`safeSpawnSync()` calls `isWindowsShellHijackRisk()` in `lib/core/fs.js` to refuse a spawn when a file in the working directory would be found instead of the intended command. The check returns early in two cases:
- No `cwd` option. The child then starts in cdxgen's own working directory, which is the repository when cdxgen is run from inside it. This covers the atom `--frontend-args-keys` and `--help` probes and two `dotnet msbuild` spawns (`lib/cli/managedBom.js` and `lib/ecosystems/parsers-dotnet.js`).
- No shell. On Windows, libuv also searches the working directory for `name.com` and `name.exe` before `PATH`. This covers `execGitCommand()`, the formulation git calls, and `go list` and `go mod graph`, all of which set `cwd` to the project.
The `node.cmd` and `dotnet.cmd` routes need cdxgen to be started from inside the repository, and the `dotnet msbuild` spawns only run with installs on. The `git.exe` route also applies when the repository is passed by path from another directory.
Impact
Code execution on Windows hosts, including Windows CI runners, for whoever authors the scanned repository or a pull request to it. Formulation, and with it the git route, is on with `--include-formulation` and `--bom-audit`, and by default under `CI=true` from 13.7.0. Linux and macOS hosts are not affected.
Patches
Fixed in `@cdxgen/cdxgen` 13.8.0. Versions 13.0.0 through 13.7.0 of `@cdxgen/cdxgen` are affected. The 12.x line, published as `@cyclonedx/cdxgen`, is also affected from 12.2.0 through 12.9.1, and no 12.x release contains the fix. Users of 12.x should move to `@cdxgen/cdxgen` 13.8.0 or apply the workarounds below. File paths in this advisory refer to the 13.x source tree; in 12.x most of the same functions are under `lib/helpers/` or in `lib/cli/index.js`.
Workarounds
- On Windows, remove files named `git.exe`, `git.com`, `go.exe`, `go.com`, `node.cmd`, `node.exe`, `dotnet.cmd` and `dotnet.exe` from untrusted checkouts before scanning, or scan untrusted repositories on Linux or macOS.
- Run cdxgen from a directory other than the checkout.
Credit
This issue was found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-MKLF1OWF.
References
- https://github.com/cdxgen/cdxgen/blob/master/SECURITY.md
- https://github.com/cdxgen/cdxgen/blob/master/docs/THREAT_MODEL.md
- Fixed in: https://github.com/cdxgen/cdxgen/pull/4787
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@cyclonedx/cdxgen |
Corregida | 12.9.2 | 0 d | 12.9.2 no afectada |
12.9.213.8.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/cdxgen/cdxgen/security/advisories/GHSA-g4w7-2q9v-h6q2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
