Vucic had just laid a flower at a monument for thousands of victims identified and buried there when the crowd started to chant 'Allahu Akbar' (God is Great) and hurled stones, forcing the prime minister to run for cover shielded by his bodyguards.
Serbia's Tanjug state-run news agency said Vucic was hit on the head by a stone and had his glasses broken.
Vucic, whose country backed Bosnian Serbs during and after the 1990s inter-ethnic war in Bosnia, was among numerous dignitaries and tens of thousands of people attending the commemoration in the eastern town.
Serbian and Bosnian Serb politicians have long denied the extent of the killing, although two international tribunals have described the bloodshed as genocide.
The slaughter was followed a few months later by the peace deal which ended Bosnia's 1992-1995 war. The conflict cost the lives of an estimated 100,000 people.