Remote code execution vulnerability in Git
A buffer overflow in Git versions before 2.7.4 could be triggered by pushing or cloning a repository with a large filename or many nested trees, potentially leading to remote code execution on both client and server.
ma.ttias.be
Published on ma.ttias.be
This has the potential to be huge: server and client side remote code execution through a buffer overflow in all git versions before 2.7.1 2.7.4 (see update ).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a heap corruption / buffer overflow bug in Git's handling of path names, as the text quotes a fix for a heap corruption / buffer overflow bug.
Impact
An attacker could potentially execute code on a Git server or client, but server-side exploitation requires write access to a repository, and the text notes that hosted services like GitHub and Bitbucket have resources to patch quickly.
What the attacker needed
Git version before 2.7.4; For server: write access to a repo; For client: ability to run git clone
The fix
The vulnerability was fixed in Git 2.7.4, and older maintenance tracks received backported patches.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Git is a tool for tracking changes in code. A buffer overflow is a bug where a program writes more data than it has space for, which can let an attacker run their own commands. Here, a malicious repository with an oversized filename or deeply nested folders could crash Git or let an attacker take control of the machine running Git.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.