The problem must be solved within the leadership of Islam.
The problem cannot be solved within the leadership of Islam, because there is no monolithic Islam.
This is the equivalent of saying that the Roman Catholic Church should involve itself in the affairs of the Southern Baptist Convention, because they're both Christian. Actually, one of them is Protestant. And not only Protestant, but a separatist group from a separatist group. That's three schisms for anyone trying to keep track.
The Islamic sects which attract/breed extremists have leadership who support extremism.
The honest leaders of the religion need to become more vigorous about this - expel those inciting violence, denounce them as heretics, cause a schism, all the same shit that the Catholic church had to go through in centuries past.
Islam suffered a defining schism shortly after the death of Mohammed.
The Sunnis supported the choosing of Mohammed's father-in-law, Abu Bakr, as the first Caliph.
The Shia believed Mohammed chose his cousin and son-in-law, Ali, as successor and have been pissed off ever since that he wasn't elected as the first Caliph.
Then these two groups spent the better part of a millennium fighting each other over who should be in charge, creating splinter factions the entire way.
National leaders who are not religious leaders need to do what they can to support that.
There are more than a few Persian Gulf states who are widely known to tacitly or actively support the funding of extremists. Saudi Arabia, Qatar, Yemen, Kuwait, Iran, and Syria are the first ones that come to mind. Some of them publicly condemn terrorism, but everyone knows that they do almost nothing to stop their very rich citizens from funneling money into the hands of extremist groups.
There's much more to be said on the topic, but I'll close by pointing out that your comments belie either ignorance or a deep misunderstanding about Islam and the Middle East.