The Afghan Taliban, ousted from power by an American-led coalition in 2001, claimed responsibility for the attack at the base on the eastern outskirts of Kabul.
Bomb attacks targeting foreign troops and Afghan government officials and security forces have intensified as the international military coalition draws down, leaving the fight against the Taliban insurgency mostly to Afghan forces.
Tuesday's explosion targeted a foreign base in the Pul-e-Charkhi district in eastern Kabul, and at least two Afghan security guards were killed, said Gen. Mohammad Zahir, Kabul's police chief.
He said investigations were under way, but early reports indicated that explosives were hidden under sand in the back of a mini-truck that approached the base.
The blast was large enough to rattle windows several kilometers away in Kabul's central diplomatic district.
Taliban spokesman Zabihullah Mujahid said in an emailed statement that the truck bomb was aimed at an intelligence center of foreign troops. He said a suicide bomber started the attack and several insurgent gunmen breached the walls of the base.