miley Cyrus
U.S. singer Miley Cyrus performs during her concert at the Ericsson Globe Arena in StockholmReuters

Miley Cyrus has been shocking fans all over the world with her raunchy onstage antics, and during the Madrid leg of her "Bangerz" tour, the singer stirred another controversy when she suffered a wardrobe malfunction.

Cyrus, who was wearing a dollar-bill leotard during her latest stop on her world tour, flashed her nude underwear when she yanked up her costume, shocking fans who were on the front row.

While some reports claim that it was a serious wardrobe malfunction, there are many who believe Cyrus did it on purpose to increase the shock element of her onstage act.

Cyrus has been courting controversy throughout her "Bangerz" tour for her wild onstage antics that includes touching herself inappropriately, pretending to perform oral sex on a man dressed as Bill Clinton, grinding on a car and even straddling a giant-sized hotdog.

Shocked parents have been vocal about their disapproval of the explicit content featured on her shows, but these complaints have had no effect on Cyrus, who has shown no signs of toning down her performances.

"I don't think people realise how much energy I put into my shows & how much their bad energy brings me down," she tweeted.

"You can't say I didn't warn you. Now sit back relax & enjoy the show. #bangerztour," she added.

Interest in Cyrus peaked in 2013 following her raunchy VMA performance with Robin Thicke during their performance of last year's summer anthem, Blurred Lines. Although Cyrus received criticism from several quarters, the 21-year-old defended her performance saying her sole intention was to make history.

"Honestly, that was our MTV version," she told Rolling Stone last year. "We could have even gone further, but we didn't. I thought that's what the VMAs were all about! It's not the Grammys or the Oscars. You're not supposed to show up in a gown, Vanna White-style. It's supposed to be fun!"

Meanwhile, Cyrus recently proved that she is not just a wild child when she sent a video message to a dying fan. The video message was sent on June 13, and the young fan, Caley Camarillo, who was suffering from cystic fibrosis, watched it just an hour before she passed away.

Caley's mother, Teresa, posted the video on social networking sites, and praised Cyrus for her selflessness.

"I just wanted to share how things go full circle," Teresa captioned the post. "Miley Cyrus was the very first celebrity that Caley was into and the very first celebrity she met....Caley's life was then sent into an amazing journey meeting a lot of wonderful people who have taken the time to get to know such an amazing soul."

"Back to the full circle," she continued. "Miley Cyrus sent this to Caley and she was able to watch it an hour before she had passed. We have video of Caley watching the vid but that we will save for ourselves. She managed to let out a smile. I take great comfort in this for some reason."