CVE-2022-25866
Command Injection
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.1
Command Injection
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.
- Record
CVE-2022-25866- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P - Updated
- 2026-11-02
EUVDEUVD-2022-1613
8.1
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.
- Record
EUVD-2022-1613- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-3xpw-vhmv-cw7h
8.1
Command injection in czproject/git-php
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.
- Record
GHSA-3xpw-vhmv-cw7h- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-74, CWE-77
- Updated
- 2026-11-02
NVD
8.1
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.
- Record
CVE-2022-25866- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-88
- Updated
- 2026-11-02
OSV
8.1
Command Injection
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.
- Record
CVE-2022-25866- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P - Updated
- 2026-11-02
OSVGHSA-3xpw-vhmv-cw7h
8.1
Command injection in czproject/git-php
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.
- Record
GHSA-3xpw-vhmv-cw7h- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-74, CWE-77
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
czproject/git-phpPackagist |
before 4.0.3 | 4.0.3 |
czproject/git-phpPackagist |
before 4.0.3, plus listed versions 3.10.0v1.0.0v1.0.1v1.0.2v2.0.0 Show 30 moreShow lessv3.0.0v3.1.0v3.11.0v3.12.0v3.13.0v3.13.1v3.14.0v3.15.0v3.15.1v3.16.0v3.16.1v3.16.2v3.17.0v3.17.1v3.18.0v3.18.1v3.18.2v3.2.0v3.3.0v3.4.0v3.5.0v3.6.0v3.7.0v3.8.0v3.9.0v3.9.0-RC1v3.9.1v4.0.0v4.0.1v4.0.2 |
4.0.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-25866 is a high vulnerability (CVSS 8.1) in Git-php Project Git-php, published April 25, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.65%, the 89th percentile. Fixed in czproject/git-php 4.0.3.
References
snyk.io/vuln/SNYK-PHP-CZPROJECTGITPHP-2421349
github.com/czproject/git-php/commit/5e82d5479da5f16d37a915de4ec55e1ac78de733
github.com/czproject/git-php/releases/tag/v4.0.3
nvd.nist.gov/vuln/detail/CVE-2022-25866
github.com/advisories/GHSA-3xpw-vhmv-cw7h
github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25866.json
github.com/czproject/git-php