QID 355256

Date Published: 2023-05-29

QID 355256: Amazon Linux Security Advisory for git : ALAS2023-2023-065

git is distributed revision control system.
Gitattributes are a mechanism to allow defining attributes for paths.
These attributes can be defined by adding a `.gitattributes` file to the repository, which contains a set of file patterns and the attributes that should be set for paths matching this pattern.
When parsing gitattributes, multiple integer overflows can occur when there is a huge number of path patterns, a huge number of attributes for a single pattern, or when the declared attribute names are huge.
These overflows can be triggered via a crafted `.gitattributes` file that may be part of the commit history.
Git silently splits lines longer than 2kb when parsing gitattributes from a file, but not when parsing them from the index.
Consequentially, the failure mode depends on whether the file exists in the working tree, the index or both.
This integer overflow can result in arbitrary heap reads and writes, which may result in remote code execution.
The problem has been patched in the versions published on 2023-01-17, going back to v2.30.7.
Users are advised to upgrade.
There are no known workarounds for this issue. (
( CVE-2022-23521) a vulnerability was found in git.
This flaw occurs due to git not checking the ownership of directories in a local multi-user system when running commands specified in the local repository configuration.
this allows the owner of the repository to cause arbitrary commands to be executed by other users who access the repository. (
( CVE-2022-24765) a vulnerability was found in git.
This issue allows the owner of the repository to cause arbitrary commands to be executed by other users who access the repository.

Successful exploitation of this vulnerability could lead to a securitybreach or could affect integrity, availability, and confidentiality.

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as High - 6.9 severity.
  • Solution
    Please refer to Amazon advisory: ALAS2023-2023-065 for affected packages and patching details, or update with your package manager.
    Vendor References
    Software Advisories
    Advisory ID Software Component Link
    ALAS2023-2023-065 amazon linux 2023 URL Logo alas.aws.amazon.com/AL2023/ALAS-2023-065.html