On Tuesday evening, a group of five to seven men attacked passers-by with knives, German magazine Focus cited police as saying, adding that none of the victims sustained life-threatening injuries.
The injured were taken to a clinic in Hanau, which is located about 20 kilometers from Frankfurt am Main, police said in a statement.
It also said police officers had detained two suspects. They are 23- and 29-years-old.
An unnamed police spokesman said the motive for the attack was still unclear, adding, however, that there were no signs that the incident was connected to previous shooting incidents in Hanau.
Back in February, a gunman opened fire outside a bar in the Heumarkt district in Hanau and then drove off to a second location in the Kesselstadt district, where he opened fire again, killing a total of nine people and injuring several others.
The victims were reported to have been young members of the country’s minority Turkish community, who have been targeted due to rising Islamophobia inside Germany.
The suspect in those attacks was a 43-year-old German citizen from Hanau and, together with his 72-year-old mother, was later found dead at his home.
Germany has been targeted in recent years by several extremist attacks, one of which killed 12 people in the heart of Berlin in December 2016.
But far-right attacks have become a particular concern for German authorities. The increase in hate crimes in recent months has prompted the country to expand a crackdown on right-wing political violence in order to repress the disturbance.