From Somalia in the east to the Western Sahel, Africa’s hotspots started getting hotter over the past week with a series of terror attacks that have raised fears of a new wave of extremist violence. Terrorism analysts have posited that al-Qaeda is vying for attention and territory with upstart ISIS in a region rife with instability. But as much as terrorist groups thrive on government weakness, military corruption also plays an important role, according to a new report on corruption in military defense spending in Africa.

Transparency International, a U.K.-based research organization that tracks corruption and perceptions of corruption worldwide, gave every single African country surveyed (47 out of 54) a failing or near-failing grade when it comes to preventing graft in their defense sectors. Defense spending is on the rise across the continent, notes the report, but without better tracking on how that money is spent, there is little to ensure that it will go to the areas that need it most in a new era of terror attacks, namely counter-terror and security programs. “With such limited oversight on military spending, there are many opportunities for corruption and graft that can in turn contribute to rising insecurity in the region,” says Leah Wawro, Transparency International’s program manager for conflict and insecurity. Corruption, adds co-author Eléonore Vidal de la Blache, the Africa project manager, can lead to black-market arms sales to terror groups, or, in some cases, bolster funding for those groups.

The report’s release on Monday capped a week of back-to-back attacks across Africa. Even as scenes of a devastating suicide bomb and grenade attack on a pair of luxury hotels and a café popular with foreigners unfurled in Burkina Faso, killing at least 29 people from nine different countries, reports started coming in of the kidnapping of an Australian couple in the country’s north, then an ambush on an aid convoy in neighboring Mali that killed two soldiers. Al-Qaeda in the Islamic Maghreb (AQIM) claimed responsibility for the attack in Burkina Faso’s capital, Ouagadougou, and the group, or its affiliates, is thought to have been behind the kidnapping and the assault in Mali. Meanwhile, al-Shabaab militants affiliated with al-Qaeda claimed to have killed more than 100 Kenyan soldiers in a Friday attack on a remote base in Somalia’s southwest, where the African Union is trying to bring peace. And on Jan. 13, two female suicide bombers attacked a mosque in a town near Cameroon’s border with Nigeria during morning prayers, killing 10 in the latest of a series of suicide bombings attributed to the ISIS-affiliated Boko Haram terror group, which is based in Nigeria.

In the wake of the attack in Ouagadougou, which followed the same pattern as a similar attack in the Malian capital of Bamako in November, the prime ministers of Mali and Burkina Faso agreed to share intelligence and conduct joint security patrols in their efforts to tackle the rising terror threats in the region. But that is not likely to be enough, say the authors of the Transparency International report.

One of the biggest problems, according to the report, is how such corruption can decrease morale among soldiers, especially when commanding officers pocket salaries meant for those in the lower ranks. Such siphoning of funds is rampant in Nigeria, where soldiers have regularly deserted their posts because they say they lack sufficient supplies and weapons to fight against Boko Haram. On Friday, the recently elected President Muhammadu Buhari ordered an investigation into corruption allegations going back nine years, saying that graft among senior ranks of the military hindered the fight against an Islamist insurgency in the north of the country. Sambo Dasuki, the former national security advisor under Buhari’s predecessor and rival, Goodluck Jonathan, was arrested in December, in the wake of a government commission finding that he, along with other senior officials, allegedly pilfered some $5.5 billion meant for equipping, supplying and paying soldiers taking on Boko Haram. Dasuki has denied the charges, calling the findings “presumptive, baseless” and lacking in “diligence.”

Members of the Jonathan administration say the allegations that graft hampered the military’s counter-terror abilities are unsubstantiated. Wawro, of Transparency International, calls the claims justified. “Absolutely, corruption is undermining the fight against Boko Haram [in Nigeria]. When soldiers’ salaries are pocketed, when they see their commanders driving fancy cars while they struggle to eat, they are more likely to sell weapons and other supplies. They are more likely to take bribes, and they are more likely to allow arms or drugs to be smuggled across borders.” They are also more likely to desert, she adds, further undermining confidence in the military, and the government.

It’s not just Nigeria. Kenya’s armed forces also stand accused of being involved in bribe taking, arms sales, and worse. A recent report by Journalists for Justice, a Nairobi-based, non-partisan organization that seeks to broaden citizen understanding of international criminal justice and combat government impunity, details how Kenyan soldiers in Somalia are working in cahoots with the al-Shabaab terror group to levy “taxes” on the illegal smuggling of sugar and charcoal through the Somali port of Kismayo. “This is problematic when the KDF [Kenya Defense Force] is supposed to be fighting al-Shabaab, and when elsewhere in the country al-Shabaab forces claim to have killed more than 100 Kenyan soldiers,” says Vidal de la Blache. “What you are seeing is a direct link between the ability of al-Shabaab to arm and sustain itself and the corruption within the Kenya defense establishment all the way to the top.” Rather than promise an investigation, the Kenyan government has dismissed and denied the allegations.

It is impossible to know whether there is any direct link between the weekend attacks in Burkina Faso and corruption within that country’s military establishment, says Wawro. But the country is one of the worst ranked in the Transparency report. “What you can say about any country that scores an “F” [as Burkina Faso does] is that there is no one to hold the military to account about what is being done to prevent these attacks, and how the increase in funding we are likely to see after an attack like this will be put to use.” That, she says, creates a level of distrust between the people and their government, one easily exploited by terror groups.

While the report points fingers at African governments for failing to track military spending, the report’s authors aren’t letting the U.S. and France, the principal financial backers of many of Africa’s counter terror efforts, off the hook. “We are not seeing [these countries] taking the kind of actions needed to address the problem,” says Wawro. Kenya’s military, she notes, is a major recipient of U.S. military aid. “So, if you look through a winding lens, U.S. money is indirectly filtering in to support terrorism.” That, she says, is reason enough for the foreign backers of African counter terror programs to insist on greater transparency in spending, lest their assistance end up funding another terror attack.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.