News Security

Git project patches six security vulnerabilities in new releases

The Git project released fixes for six flaws, including code execution during recursive clones of a malicious repository and memory corruption in merges.

The Git project has released new versions of Git, the version control tool developers use to track code, to fix six security vulnerabilities, including arbitrary code execution when recursively cloning a malicious repository. The GitHub Blog reports that the flaws also include unintended file writes and memory corruption during merges and binary patch processing.

The fixes ship in Git 2.56.1, with backports to six older maintenance series. The project recommends updating to that release or the patched version of the series in use, and updating applications that bundle Git.

In the code execution flaw, an extremely long path can pass Git's safety checks under one name and then be written under a shorter one. An attacker can use this to replace a submodule's.git file with a symbolic link to a directory holding malicious configuration or hooks. Git can then run attacker-controlled code during a recursive clone. The fix rejects such long paths before their lengths are truncated.

Another flaw lets a malicious server advertise an unsafe HEAD target when a user clones an empty repository, which can lead to writes outside the intended reference directory. A third involves tags with more than two GPG signatures, which can corrupt memory and crash Git when merged. Hosting services that merge on behalf of users can be affected.

Source: Git security vulnerabilities announced – The GitHub Blog.