The man committed the act in front of a female who was studying in a secluded area of the library at about 12:15 p.m. Friday, police said. He then left on foot.
He is described as a black man in his late teens or early 20s, 5 feet 9 inches to 5 feet 11 inches tall, with short, curly black hair. He was wearing a gray hooded sweatshirt and dark, baggy shorts.
Anyone with information about the case is asked to call Millbrae police at (650) 259-2300.