The Taliban claimed responsibility for the attack.
The bomber, who was on foot, detonated his explosives' vest as he walked by the vehicle in the western part of the city, said Najib Danish, the Interior Ministry's deputy spokesman.
The attack came as the Taliban named a new leader following the death of their former leader, Mullah Akhtar Mansour, in a US drone strike in Pakistan on Saturday.
The casualties in today's bombing included both court workers and civilians and the explosion also wounded four people, Danish said.
Within an hour of the assault, the Taliban, who often target government employees in their war against the state, claimed responsibility for the bombing.
The claim came from Zabihullah Mujahid, a Taliban spokesman, in an email sent to the media.
"This attack was carried out as revenge for the killing of six innocent prisoners in Kabul," the statement said. It was a reference to the hanging early this month at a Kabul prison of six Taliban members convicted of terrorism.
The executions were the first approved by Ghani since he took office in 2014, promising to end the war. After the hanging, a Taliban statement accusing Kabul and the US of torture, inhumane treatment and "killings under suspicious circumstances."
The suicide attack in Kabul was the second of its kind on the judiciary this month - a judge was gunned down by unknown attackers in Kabul earlier in May.
The UN mission in Afghanistan condemned the attack. Since January 1, UNAMA has verified 14 separate attacks targeting judges, prosecutors and judicial staff in Afghanistan, resulting in nine civilian deaths and 19 civilians wounded.
"Attacks against judicial authorities are cowardly and contrary to international humanitarian law," said Nicholas Haysom, the chief of UNAMA, adding that the mission urges "authorities to do everything in their power to ensure adequate protection of judicial officials."
The last major attack in Kabul was on April 19, when a massive bomb killed 64 people and wounded hundreds. The Taliban also claimed that bombing.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
