The 18-year-old woman was walking alone on a lane between the University Sports Hall and the David Russell Apartments, on the outskirts of the town, at around 1am yesterday when she was attacked.
Police say the woman became aware of a man walking along the path behind her before he grabbed her and indecently assaulted her. The attack lasted a very short time before the assailant fled from the scene, but police say the victim was "extremely shaken" by the ordeal. She did not suffer any injuries.
Her attacker is described as as 5ft 8ins to 5ft 10ins wearing a dark Puffa jacket, dark tracksuit bottoms, grey beanie hat and possibly wearing gloves. He may have been of foreign appearance.
The woman had been in the central area of St Andrews with friends prior to the incident.
Chief Inspector Adrian Annandale appealed to anyone who was in the area and saw anyone matching the description of the man, or who may know his identity, to contact the police on 101. All information will be treated with the strictest confidence.
Chief Inspector Annandale added: "This type of incident is rare and it is not known what the man's motive was, however the victim was very shaken by it. I would take this opportunity to remind the public when they are in more remote areas to be aware of their personal safety."
The attack took place in an area roughly a mile west of St Andrews town centre, close to where the famous Old Course Hotel and golf course are located.
The David Russell Apartments are a university-owned residence which accommodates around 330 students in 57 houses.