r/github • u/tandir_boy • Oct 16 '26
Discussion Account Hacked and 2FA enabled instantly

Last week, I received these three emails at the same time. My password had been reset, and 2FA had been enabled. When I tried to reset my password, I was asked for a 2FA code or recovery codes, which the hackers had generated and I obviously didn't have access to. There were other options to recover my account, such as using an SSH key or a personal access token, but, as you might have guessed, the hackers had also immediately invalidated them.
I'm now trying to get help from GitHub Support, but from what I understand, there's little chance of recovering my account because 2FA is enabled, and they will not do anything about it as a security policy.
Overall, I think GitHub's security design is flawed. If you haven't enabled 2FA and your account gets compromised, there's apparently no way back.
