CVE-2022-25866Git-php Project Git-php
Critical 9.8 No auth needed
Follow: this CVE · Git-php Project · Git-php Project Git-php We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 4.1% probability of exploitation in 30 days · percentile 91
- Auth required
- No
- Published
- Apr 25, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-88
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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
- Apply the vendor's security update for Git-php.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | czproject/git-php |
< 4.0.3 |
4.0.3 |
composer require "czproject/git-php:^4.0.3" |
Per OSV / GitHub Advisories (GHSA-3xpw-vhmv-cw7h). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| git-php_project | git-php | < 4.0.3 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Release Notes Third Party Advisory
- snyk.io Exploit Patch Third Party Advisory