O'Leary told The Sun's TV Buzz that he ended up hosting the show with only a safety pin protecting him from revealing his crotch to the nation on live TV.
"I remember having a wardrobe malfunction on The X Factor. I had this tight-fitting Alexander McQueen suit," said O'Leary.
"I felt the trousers rip...from pole to pole, shall we say. I just had to skilfully apply a safety pin and hope for the best. It was terrifying."
O'Leary is helming BAFTA red carpet footage this weekend for E! and claimed that his biggest fear is having an accident with a Hollywood star's gown.
"I'll be over the moon if I get to interview Meryl Streep - though I'd be mortified if I stood on her dress!" he said.
> X Factor Dermot O'Leary: 'I'm not concerned by Steve Jones axing'
> Dermot O'Leary, Fearne Cotton to present from BAFTA red carpet for E!