There seems to be some agreement that Hungarian is one language of the Ugro-Finnic family together with many others: https://en.wikipedia.org/wiki/Finno-Ugric_languages but you're right about unclear geographical origins.
Current theories say it originated from the language spoken between the Black Sea and the Ural mountains [1] and was probably brought to current East Europe during a migration.