The Kerala High Court on Tuesday granted bail to four CPI(M) workers booked for allegedly attacking Enforcement Directorate (ED) officials who were returning after a search operation conducted at the residence of the former Kerala Chief Minister Pinarayi Vijayan.