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

VectorAV: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

Weakness Enumeration

Related Identifiers

CVE-2022-25866
GHSA-3XPW-VHMV-CW7H
SNYK-PHP-CZPROJECTGITPHP-2421349

Affected Products

Gitphp