“Up front” is pretty different from the other two. It isn’t about time so much as about honesty. “He told me up front that he was broke” basically means he was honest about it from the start, that he told me as soon as we met or as soon as our relationship got serious.
Upfront is also used when you pay for something before you get it. “You have to pay half upfront, and the rest after we finish the job.”
He told me in advance and he told me beforehand have less to do with honesty, and are more about time. If I say “he told me in advance he wouldn’t be able to come to the party” it means he told me before the party. “Beforehand” means essentially the same thing, but it’s less common; I never use it except occasionally in writing.
“If I’d known beforehand it would rain, I wouldn’t have come.”
“He booked his ticket in advance.”
“He booked his ticket beforehand.”
“She told me up front that she wasn’t ready for a serious relationship”