The death toll in an attack on a ceremony in Kabul rose to 27, a ministry of health spokesman said on Friday.