Story highlights A U.S. commander has told Congress ISIS may have 3,000 fighters in Afghanistan

Vladimir Putin has long worried about jihadists from Russia's Caucasus region going to Syria

Washington (CNN) Russian President Vladimir Putin is turning to an old enemy -- the Taliban -- to share intelligence as the number of ISIS fighters grow in regional neighbor Afghanistan.

Russian Foreign Ministry spokeswoman Maria Zakharova said the contact between Moscow and the Afghan Taliban only involves intelligence-sharing and information exchange regarding the fight against ISIS.

Why would Putin put himself in a risky spot by working with the Taliban? He's aligning himself with the enemy of his enemy.

A U.S. commander last month told Congress that ISIS has gained strength in Afghanistan in recent months, with as many as 3,000 fighters there.

Putin has long worried about thousands of jihadists from Russia's Caucasus region and the former Soviet republics going to fight with ISIS in Syria.

Read More