- The FSB's warning came after the Russian military last week declared Syria "liberated" from the Islamic State group, and after a visit on Monday by President Vladimir Putin to Russia's airbase in the war-ravaged country.
Russia's security service on Tuesday said it was on alert for the possible return of jihadists from Syria ahead of the World Cup and the presidential election in 2018.
The FSB's warning came after the Russian military last week declared Syria "liberated" from the Islamic State group, and after a visit on Monday by President Vladimir Putin to Russia's airbase in the war-ravaged country.
Russia first intervened in the Syrian conflict in 2015, staging air strikes in support of President Bashar al-Assad which targeted both IS and other jihadists as well as rebels fighting government troops.
As many as 40,000 fighters travelled from all over the world, including Russia, to join IS in Russia after the 2014 declaration of its self-styled "caliphate" straddling Syria and Iraq.
In 2015, Russian security services estimated that 2,900 Russian citizens had joined IS, as well as "several thousands" from Central Asia.
Now that IS' "caliphate" has all but collapsed, its "leaders and fighters are looking for ways to continue their terrorist activities in the territory of other countries, including Russia", FSB director Alexander Bortnikov was quoted by Russian agencies as saying.
"The return of former members of illegal armed groups from the Middle East to Russia poses a real danger" as they can form sleeper cells and recruit new members, he added.
- Attacks thwarted -
Bortnikov said the security services had ensured the Confederations Cup ran smoothly this year.
They will draw on this experience to ensure they prevent attacks on venues in 13 cities hosting the World Cup from June 14 to July 15 next year.
"Our priority is to secure locations where crowds will gather, as well as energy infrastructure sites ... and sports venues that will host the 2018 football World Cup, to ensure they are not targets for terror attacks," Bortnikov said.
The FSB has thwarted attacks, including a suicide bombing, that an IS cell from southern Russia was planning for the upcoming New Year holidays and early next year, a statement carried by Russian news agencies said.
Another assault was being planned for the presidential campaign, it added.
Security forces in a raid arrested three people and seized explosives and automatic weapons, it said.
Russia will hold a presidential election in March 2018, with the campaign officially expected to start later this month, following an announcement by Putin that he will stand for a fourth time.