Police say charges are pending.
Police said a man followed the woman into the laundry room of a building on Ridge Boulevard in Bay Ridge around 9:30 a.m.
He exposed himself to her and attempted to assault her.
Another resident of the building walked into the laundry room, interrupted the attack and the suspect ran off.
The woman was taken to the hospital.
Police do not believe the suspect lives in the building, it appears he entered through a side door.
The building has a buzzer system and has cameras all around it but does not appear to have a doorman.
Police searched for the suspect who was described as a heavyset man in his 30s wearing all dark clothing.
City Councilman Justin Brannan said cops seemed confident they would catch him.
And he said detectives have a clear photo of him appearing to flee through the lobby.
Brannan said the victim is okay.
Police are asking anyone with information to submit their tips to @NYPDTips on Twitter or call 1-800-577-TIPS (8477). Submissions will remain anonymous.
MORE NYC NEWS: How NYC will keep outdoor diners warm this winter
* More Brooklyn news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube
Submit a News Tip