RHEL 7 : rh-git227-git (RHSA-2023:3280)

high Nessus Plugin ID 176256

Synopsis

The remote Red Hat host is missing one or more security updates.

Description

The remote Redhat Enterprise Linux 7 host has packages installed that are affected by multiple vulnerabilities as referenced in the RHSA-2023:3280 advisory.

- Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, by feeding specially crafted input to `git apply --reject`, a path outside the working tree can be overwritten with partially controlled contents (corresponding to the rejected hunk(s) from the given patch). A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid using `git apply` with `--reject` when applying patches from an untrusted source. Use `git apply --stat` to inspect a patch before applying; avoid applying one that create a conflict where a link corresponding to the `*.rej` file exists. (CVE-2023-25652)

- In Git for Windows, the Windows port of Git, no localized messages are shipped with the installer. As a consequence, Git is expected not to localize messages at all, and skips the gettext initialization.
However, due to a change in MINGW-packages, the `gettext()` function's implicit initialization no longer uses the runtime prefix but uses the hard-coded path `C:\mingw64\share\locale` to look for localized messages. And since any authenticated user has the permission to create folders in `C:\` (and since `C:\mingw64` does not typically exist), it is possible for low-privilege users to place fake messages in that location where `git.exe` will pick them up in version 2.40.1. This vulnerability is relatively hard to exploit and requires social engineering. For example, a legitimate message at the end of a clone could be maliciously modified to ask the user to direct their web browser to a malicious website, and the user might think that the message comes from Git and is legitimate. It does require local write access by the attacker, though, which makes this attack vector less likely. Version 2.40.1 contains a patch for this issue. Some workarounds are available. Do not work on a Windows machine with shared accounts, or alternatively create a `C:\mingw64` folder and leave it empty. Users who have administrative rights may remove the permission to create folders in `C:\`. (CVE-2023-25815)

- Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, a specially crafted `.gitmodules` file with submodule URLs that are longer than 1024 characters can used to exploit a bug in `config.c::git_config_copy_or_rename_section_in_file()`. This bug can be used to inject arbitrary configuration into a user's `$GIT_DIR/config` when attempting to remove the configuration section associated with that submodule. When the attacker injects configuration values which specify executables to run (such as `core.pager`, `core.editor`, `core.sshCommand`, etc.) this can lead to a remote code execution. A fix A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid running `git submodule deinit` on untrusted repositories or without prior inspection of any submodule sections in `$GIT_DIR/config`. (CVE-2023-29007)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Update the affected packages.

See Also

https://access.redhat.com/security/cve/CVE-2023-25652

https://access.redhat.com/security/cve/CVE-2023-25815

https://access.redhat.com/security/cve/CVE-2023-29007

https://access.redhat.com/errata/RHSA-2023:3280

Plugin Details

Severity: High

ID: 176256

File Name: redhat-RHSA-2023-3280.nasl

Version: 1.0

Type: local

Agent: unix

Published: 5/23/2023

Updated: 5/23/2023

Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Azure, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.8

Temporal Score: 6.1

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:C/A:N

CVSS Score Source: CVE-2023-25652

CVSS v3

Risk Factor: High

Base Score: 7.8

Temporal Score: 7

Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS Score Source: CVE-2023-29007

Vulnerability Information

CPE: p-cpe:/a:redhat:enterprise_linux:rh-git227-git-credential-libsecret, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-instaweb, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-p4, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-cvs, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-subtree, p-cpe:/a:redhat:enterprise_linux:rh-git227-git, p-cpe:/a:redhat:enterprise_linux:rh-git227-gitweb, p-cpe:/a:redhat:enterprise_linux:rh-git227-perl-git-svn, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-all, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-core, cpe:/o:redhat:enterprise_linux:7, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-core-doc, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-gui, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-svn, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-daemon, p-cpe:/a:redhat:enterprise_linux:rh-git227-gitk, p-cpe:/a:redhat:enterprise_linux:rh-git227-perl-git, p-cpe:/a:redhat:enterprise_linux:rh-git227-git-email

Required KB Items: Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list, Host/cpu

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 5/23/2023

Vulnerability Publication Date: 4/25/2023

Reference Information

CVE: CVE-2023-25652, CVE-2023-25815, CVE-2023-29007

RHSA: 2023:3280