# CVE-2026-16629: danger danger-js CLI localGetFileAtSHA.ts danger.git.diffForFile os command injection

> Local attackers can execute arbitrary OS commands via the danger.git.diffForFile function in the danger-js CLI.

- **Severity:** Medium 4.8 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Jul 2026
- **Updated:** 28 Jul 2026
- **Also known as:** GHSA-3x93-p86w-5jvh

## What is CVE-2026-16629?

CVE-2026-16629 is a medium-severity command injection vulnerability in danger-js, published on 22 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability was identified in danger danger-js up to 13.0.7. Impacted is the function danger.git.diffForFile of the file source/platforms/git/localGetFileAtSHA.ts of the component CLI. Such manipulation of the argument File leads to os command injection. The attack needs to be performed locally. Upgrading to version 13.0.8 is recommended to address this issue. The name of the patch is 087a7290264cc6fb7154ea8c2552a7b2cb8b33a3. It is advisable to upgrade the affected component.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command), CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2026-16629?

2 open source packages ship an affected version, including danger.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `danger` | npm | All versions | 13.0.8 |
| `danger` | npm | All versions | 13.0.8 |

## How do I fix CVE-2026-16629?

Upgrade danger to 13.0.8 or later.

## Is CVE-2026-16629 being exploited?

There is no known exploitation of CVE-2026-16629 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-16629 and fix it if it is affected.

What it is: CVE-2026-16629 is a medium-severity command injection vulnerability in danger-js, published on 22 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-16629 in the wild and no public exploit code.

Affected packages and fixed versions:
- danger (npm): affected all versions; fixed in 13.0.8
- danger (npm): affected all versions; fixed in 13.0.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-16629/ (Markdown: https://insights.sbomify.com/CVE-2026-16629/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-16629
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-16629
- OSV: https://osv.dev/vulnerability/CVE-2026-16629

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-16629/
Summaries are generated and may contain mistakes; the official description above is the record.
