An explosion on Friday outside an entrance to Kabul University in the Afghan capital killed at least two people and injured 10, officials said.