The incident took place in the Western Avenue area, near Leslie Roundabout, around 5.10pm on Tuesday, May 9.
A man was seen to be committing an indecent act on a dirt path in a wooded area that ran adjacent to a public footpath.
He is described as white, in his 20s, tall, of slim build, wearing a grey hooded zip-up jacket, baggy dark-coloured jeans and had a black rucksack.
Detective Constable Andy Mitchell, of Glenrothes CID, said: “We’re appealing for anyone who was in the area around the time of this incident, and who may be able to help, to contact us as soon as possible.
“We’re particularly eager to trace two females in their late 20s who were seen jogging, and a teenage male who is described as 16-17 years old and was wearing a burgundy-coloured zip-up top.
“Anyone with any other information which can assist or who recognises the man’s description is also urged to come forward.”
Those with information can contact Glenrothes CID via 101, quoting incident number 2643 of 9 May 2017, or report this anonymously to Crimestoppers on 0800 555 111.