The attack occurred on the outskirts of Ghazni city, capital of the eastern province of Ghazni, which has seen regular fighting between the Taliban and government forces.
It came as the government and Taliban are engaged in peace talks to end the war in the impoverished country that has killed tens of thousands of people in nearly two decades.
"We have received 26 bodies and 17 wounded so far. All of them are security personnel," Baz Mohammad Hemat, director of Ghazni hospital, told AFP.
Nasir Ahmad Faqiri, a member of Ghazni provincial council, confirmed the death toll.
Interior ministry spokesman Tariq Arian said a suicide bomber had detonated a vehicle full of explosives.
No group has so far claimed the attack.
The Ghazni attack comes just days after two bombs killed 14 people in the historic city of Bamiyan, ending years of calm in the isolated town famous for its ancient Buddhist heritage.
Sunday's bombing marked the latest big attack in Afghanistan, where violence has surged since the start of peace talks on September 12 in the Qatari capital of Doha.
Brutal attacks have killed more than 50 people in Kabul in recent weeks, including two assaults on educational centers and a rocket attack.
The Kabul attacks were claimed by the Daesh group, but Afghan officials blamed the Taliban -- who denied any involvement.