PT-2022-17576 · Czproject · Gitphp
Alessio Della Libera
·
Published
2022-04-25
·
Updated
2023-08-08
·
CVE-2022-25866
CVSS v3.1
8.1
High
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
czproject/git-php versions prior to 4.0.3
Description
The issue allows for 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, which can be used to perform a command injection.Recommendations
For versions prior to 4.0.3, update to version 4.0.3 or later to resolve the issue. As a temporary workaround, consider restricting the input for the
url and refs parameters in the isRemoteUrlReadable($url, array $refs = NULL) function to prevent command injection.Exploit
Fix
Special Elements Injection
Argument Injection
Command Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Gitphp