The am function in lib/hub/commands.rb in hub before 1.12.1 allows local users to overwrite arbitrary files via a symlink attack on a temporary patch file.
https://github.com/advisories/GHSA-x5m6-jh4r-34mv
https://github.com/github/hub/commit/016ec99d25b1cb83cb4367e541177aa431beb600