The blast occurred outside the interior ministry on Saturday.
The attacker detonated his explosives among a crowd of ministry of interior staff waiting at the compound’s gate, according to officials.
“As a result of a suicide bomb near the ministry of interior compound, 12 people are dead and 42 wounded,” Zemarai Bashary, a spokesman from the ministry, said.
The total toll was not immediately clear as the casualties were taken to several hospitals around the city and other officials gave different figures.
Salam Jalali, a public health ministry official, said: “Four people died in Wazir [hospital] and six people at the emergency hospital. We have got 46 people wounded and hospitalised.”
Jalali said that many of the injured were in a critical condition and that the toll could rise.
The Afghan security services and a witness said that the attack was carried out by a suicide bomber.
“It was a suicide blast,” Alishah Paktiawal, the city’s criminal investigation department chief, said.
“Most of the casualties are police officers and minister of interior workers.”
There have been several suicide blasts in the heavily secured capital this year.
One of the largest was a powerful car bomb that killed two US soldiers and 14 civilians on September 8.
An improvised explosive device south of the city killed an Italian soldier and a child on Tuesday.
The attacks are believed to have been carried out by the Taliban movement, which has been waging an insurgency since being toppled from power in late 2001.