The woman was approached by a man on the pedestrian crossing near to Dominic Pizza in Lawrence Street, at around 2am on Sunday, June 20.
The man struck up a conversation with her and a short time later, the pair were joined by another man who continued to walk along Lawrence Street with them. He turned off to walk along the path at the side of Lawrence Street Church grounds.
The woman was then sexually assaulted, but managed to run off from the men, before coming across a group of people who walked her home.
Police are appealing to motorists who were travelling along Lawrence Street in the early hours of Sunday morning to contact them, along with the group of people who walked the woman home.
A force spokesman said: "There were numerous vehicles travelling along the road at the time and officers are appealing to motorists to contact them who may have any dashcam footage of the woman and one or both of the men, walking along Lawrence Street towards James Street.
"The men were both wearing jeans and dark coloured jackets and the victim was wearing a brown fleece style jacket.
"Officers are also appealing to the group of people who assisted the woman and walked her home to contact them.
"Anyone who can assist the investigation is asked to contact North Yorkshire Police on 101 and pass information for incident number 12210143780.
"If you wish to remain anonymous, you can pass information to Crimestoppers on 0800 555 111."