The 24-year-old opened up about the attack in her autobiography Honest: My Story So Far, which is being serialised in The Sun.
The former N-Dubz star recalled how at the age of 16, her drink was spiked on a night out with friends. She described having felt "abnormally drunk" and dizzy after only a few drinks.
"The next thing I remembered was waking up lying in the back of a cab and seeing the street lights whizzing past me through the windows," she said. "I felt completely out of it, and I blacked out again."
Contostavlos claimed that the next thing she remembered was waking up in a stranger's bedroom while a friend had non-consensual sex with her.
"'I couldn't even move, let alone get up or speak, and once again I just blacked out," she continued. "When I finally woke up in the morning I found myself in a strange house."
The mother of the boy who carried out the attack believed that the 'Young' singer was her son's girlfriend and offered to make her a cup of tea. Contostavlos said that she felt "so embarrassed and ashamed" by the situation that she neglected to tell the woman what had really happened.
"I went into the bathroom and burst into tears," she said. "Then I pulled myself together, got dressed, and left without saying another word, crying all the way home."
The singer revealed that she never reported the crime, but said that she had finally "come to terms" with what happened. She added that although she had spoken to friends about the ordeal, her confusion and age at the time meant she didn't feel brave enough to approach the police or confess what she had gone through to her family.
The X Factor judge said that if the attack had taken place today, she would react differently as her experiences since have given her a newfound personal strength.
Honest, My Story So Far is published by Headline on Thursday (September 27). The Boot Camp stage of The X Factor concludes tonight at 7.30pm on ITV1.