The spokesman added that the security forces are investigating the incident, which occurred in the city police area 17.
Emergency Health Care said it had treated dozens of victims.
“After today’s explosion, we admitted 27 patients to our surgical center for war victims in Kabul, including five minors, one of them a 7-year-old boy,” Stefano Souza, Afghanistan’s emergency country director, told CNN on Wednesday.
“Two dead patients arrived and one died in the emergency room,” he said.
Taliban spokesman Zabihullah Mujahid confirmed the deaths and injuries of civilians, but did not say how many. He said in a tweet on Twitter that the Taliban government “strongly condemns” the explosion, and vowed to “arrest the perpetrators of these crimes and punish them for their heinous acts.”
Bilal Karimi, the Taliban’s deputy spokesman, condemned the blast in a tweet on Twitter Wednesday night.
“Civilian killers and perpetrators of similar crimes will soon be arrested and punished for their actions, God willing,” Karimi wrote.
Souza, of the emergency, said Afghanistan was “suffering from the consequences of a very long conflict that has undermined its future”.
“In the month of August alone, we were able to treat six mass casualties in our hospital, for a total of approximately 80 patients. Throughout the year, we continued to receive bullet wounds, shrapnel injuries, stab wounds, and mine and IED blast victims on a daily basis.”
CNN’s Brent Sowells and Johnny Hallam contributed reporting.