Armed men raided the village of Kaongo in the border province of Koulpelogo on May 15, killing at least 11 people including two women and children.
Two days later the neighboring village of Bilguimdoure was targeted, "leaving around 10 dead," a local official said.
The attackers torched homes and stores in the two villages and made off with cattle, the official said.
Sources in the security forces confirmed the attacks, and said that operations were underway to secure the area.
People living in the district said there was an exodus among local inhabitants, who were terrified of further attacks.
Koulpelogo, located on Burkina's border with Togo and Ghana, has been repeatedly attacked by Islamist militants this year, despite a crackdown by the army and a volunteer civilian militia, the VDP.
Last month, at least 24 people, including 20 VDP members, were killed in two raids in troubled region.
More than 10,000 civilians, troops and police have died, according to NGO estimates, while at least two million people have fled their homes and more than a third of the country lies outside the government's control.
Anger within the military at the mounting toll triggered two coups last year.