Prime Minister Najib Abdul Razak has contracted E. coli bacterial infection, according to a Twitter posting from his office.