I am suspecting the hacker got access to my Firefox sync account as well which would enable him to get passwords of different accounts.
Wait, you stored your passwords in the cloud?

Why on earth would you do that? Cloud storage is a terrible idea for passwords. I don't even dare use the same account on more than one device, because each device increases the risk of getting compromised, let alone give each device access to everything!