Pakistan's Prime Minister Nawaz Sharif on Monday condemned the "heinous" execution of 23 kidnapped soldiers by a Taliban faction, warning that the deaths could affect ongoing peace talks.