All warring groups in Libya must commit to a ceasefire and return to U.N.-led mediation, the European Union said on Monday, calling the situation a threat to international security.