The 32-year-old woman was grabbed by a man as she made her way to toilets believed to be near the main stage at Glasgow Green at around 10pm on Friday.
He pulled her round behind the block where another man sexually assaulted her.
The pair ran off after three men who were passing by shouted at them.
Police are appealing for information about the incident and are keen to trace the three men who shouted at the attackers.
Detective Sergeant Euan Keil said: "The woman was making her way to the toilets when she was grabbed by one man and pulled to the rear of the toilet block where another man sexually assaulted her.
"Her attackers fled when they were disturbed by three men who were walking by the area and who shouted at them.
"I don't think the three men realised what was actually going on or that their intervention probably stopped this attack from escalating.
"It is important that we trace them as what they saw could prove vital to us catching the two men responsible."
Around 50,000 people are due at the festival, now the largest in Scotland, today and tomorrow.
The two suspects are both described as white, 6ft tall, of medium build and with dark hair.
One was wearing a black T-shirt with a small logo on the front and the other a white T-shirt with black writing.
Anyone with information is asked to contact Stewart Street CID via 101 quoting incident 1094 of the 12 July 2019 or call Crimestoppers on 0800 555 111 where anonymity can be maintained.