The shooting was reported at about 7:40 p.m. at Fitzgerald Avenue and Ingalls Street.
The victims were driving and stopped at the intersection, where a suspect drove up from behind and fired several shots into their vehicle, according to police.
The victims were struck by the gunfire and drove to San Francisco General Hospital to be treated for their injuries, which are not considered life-threatening, police said.
The suspect drove away north on Ingalls Street in a green sedan and had not been found as of Friday morning, according to police.
Anyone with information about the shooting is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or to send a tip by text message to TIP411 with "SFPD" in the message.