Security forces were investigating the incident in the city’s police district 17, the spokesperson added.
Health care organization Emergency said it treated dozens of victims.
“Following today’s explosion, we admitted 27 patients to our Surgical Centre for War Victims in Kabul, including five minors, one of them a 7-year-old boy,” Stefano Sozza, Emergency’s Country Director in Afghanistan, told CNN on Wednesday.
“Two patients arrived dead, one died in the emergency room,” he said.
Taliban spokesperson Zabihullah Mujahid confirmed there were dead and wounded civilians, but did not say how many. He tweeted that the Taliban government “strongly condemns” the explosion, and vowed the perpetrators of “such crimes will be caught and punished for their heinous deeds.”
Another Taliban deputy spokesperson, Bilal Karimi, condemned the explosion in a tweet on Wednesday evening.
“The murderers of civilians and perpetrators of similar crimes will soon be caught and punished for their actions, God willing,” Karimi wrote.
Sozza, from Emergency, said Afghanistan “is suffering the consequences of a very long conflict that has undermined its future.”
“In the month of August alone, we managed six mass casualties in our hospital, with a total of almost 80 patients. Throughout the year, we have continued to receive gunshot injuries, shrapnel injuries, stabbing injuries, and victims of mine and IED explosions on a daily basis,” he said.
CNN’s Brent Swails and Jonny Hallam contributed reporting.