The bombing took place near a military academy, about seven miles from the Afghan capital's downtown, Defense Ministry spokesman Dawlat Waziri told CNN.
A suicide bomber on foot struck a bus carrying men who had been taking a course at the Marshal Fahim Military Academy.
The Taliban claimed responsibility for the attack. Zabiullah Mujahid, a Taliban spokesman, said in an email to the media that a suicide attacker targeted the bus carrying Afghan army officers.
The attack was the latest in a violent week in Afghanistan, where US-led coalition and Afghan force
s have been battling Islamic militants,
including the Taliban and ISIS.
There were two assaults
on mosques Friday as people gathered for prayers.
At least 39 people were killed in a suicide attack on a Shiite mosque in Kabul, and at least 20 people died when a bomber detonated his suicide vest at a Sunni mosque in the central province of Ghor. CNN has not confirmed any claims of responsibility.
also claimed responsibility for an attack Thursday on a base in Kandahar that killed 43 people.
At least 41 people
were killed and scores were injured Tuesday in an attack on police headquarters in Gardez, the provincial capital of Paktia in eastern Afghanistan. The Taliban again claimed responsibility.
Afghanistan "faces a continuing threat from as many as 20 insurgent and terrorist networks" in the Afghan and Pakistan region, the Pentagon said in a recent report.
These include the Taliban, al Qaeda, the Haqqani network and ISIS.
The Taliban appear to be building on gains made this year and feel emboldened financially and militarily, according to Nic Robertson, CNN's international diplomatic editor.
The Sunni Islamist organization controls more territory and population than at any point since its defeat in December 2001, CNN national security analyst Peter Bergen said.
"That's around 10 million people," Bergen said. "This gives them considerable freedom of movement to carry out attacks. They also want to signal that they are capable of carrying out attacks in every part of the country."