Skip to content

Command injection in czproject/git-php

High severity GitHub Reviewed Published Apr 26, 2022 to the GitHub Advisory Database • Updated Jan 27, 2023

Package

composer czproject/git-php (Composer)

Affected versions

< 4.0.3

Patched versions

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.

References

Published by the National Vulnerability Database Apr 25, 2022
Published to the GitHub Advisory Database Apr 26, 2022
Reviewed Apr 27, 2022
Last updated Jan 27, 2023

Severity

High
8.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2022-25866

GHSA ID

GHSA-3xpw-vhmv-cw7h

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.