ALAS2-2025-2941


Amazon Linux 2 Security Advisory: ALAS2-2025-2941
Advisory Released Date: 2025-07-30
Advisory Updated Date: 2025-07-30
Severity: Important

Issue Overview:

When a user clones an untrusted repository and runs Gitk without additional command arguments, any writable file can be created and truncated. The option "Support per-file encoding" must have been enabled. The operation "Show origin of this line" is affected as well, regardless of the option being enabled or not. (CVE-2025-27613)

A Git repository can be crafted in such a way that a user who has cloned the repository can be tricked into running any script supplied by the attacker by invoking `gitk filename`, where `filename` has a particular structure. (CVE-2025-27614)

When a user clones an untrusted repository and is tricked into editing a file located in a maliciously named directory in the repository, then Git GUI can create and overwrite any writable file. (CVE-2025-46835)

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1. (CVE-2025-48384)

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When cloning a repository Git knows to optionally fetch a bundle advertised by the remote server, which allows the server-side to offload parts of the clone to a CDN. The Git client does not perform sufficient validation of the advertised bundles, which allows the remote side to perform protocol injection. This protocol injection can cause the client to write the fetched bundle to a location controlled by the adversary. The fetched content is fully controlled by the server, which can in the worst case lead to arbitrary code execution. The use of bundle URIs is not enabled by default and can be controlled by the bundle.heuristic config option. Some cases of the vulnerability require that the adversary is in control of where a repository will be cloned to. This either requires social engineering or a recursive clone with submodules. These cases can thus be avoided by disabling recursive clones. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1. (CVE-2025-48385)


Affected Packages:

git


Note:

This advisory is applicable to Amazon Linux 2 (AL2) Core repository. Visit this FAQ section for the difference between AL2 Core and AL2 Extras advisories.


Issue Correction:
Run yum update git or yum update --advisory ALAS2-2025-2941 to update your system.

New Packages:
aarch64:
    git-2.47.3-1.amzn2.0.1.aarch64
    git-core-2.47.3-1.amzn2.0.1.aarch64
    git-credential-libsecret-2.47.3-1.amzn2.0.1.aarch64
    git-daemon-2.47.3-1.amzn2.0.1.aarch64
    git-debuginfo-2.47.3-1.amzn2.0.1.aarch64

i686:
    git-2.47.3-1.amzn2.0.1.i686
    git-core-2.47.3-1.amzn2.0.1.i686
    git-credential-libsecret-2.47.3-1.amzn2.0.1.i686
    git-daemon-2.47.3-1.amzn2.0.1.i686
    git-debuginfo-2.47.3-1.amzn2.0.1.i686

noarch:
    git-all-2.47.3-1.amzn2.0.1.noarch
    git-core-doc-2.47.3-1.amzn2.0.1.noarch
    git-cvs-2.47.3-1.amzn2.0.1.noarch
    git-email-2.47.3-1.amzn2.0.1.noarch
    gitk-2.47.3-1.amzn2.0.1.noarch
    gitweb-2.47.3-1.amzn2.0.1.noarch
    git-gui-2.47.3-1.amzn2.0.1.noarch
    git-instaweb-2.47.3-1.amzn2.0.1.noarch
    git-p4-2.47.3-1.amzn2.0.1.noarch
    perl-Git-2.47.3-1.amzn2.0.1.noarch
    perl-Git-SVN-2.47.3-1.amzn2.0.1.noarch
    git-subtree-2.47.3-1.amzn2.0.1.noarch
    git-svn-2.47.3-1.amzn2.0.1.noarch

src:
    git-2.47.3-1.amzn2.0.1.src

x86_64:
    git-2.47.3-1.amzn2.0.1.x86_64
    git-core-2.47.3-1.amzn2.0.1.x86_64
    git-credential-libsecret-2.47.3-1.amzn2.0.1.x86_64
    git-daemon-2.47.3-1.amzn2.0.1.x86_64
    git-debuginfo-2.47.3-1.amzn2.0.1.x86_64