The syrups have been “potentially linked with acute kidney injuries and 66 deaths among children”, it said.
The products were manufactured by an Indian company, Maiden Pharmaceuticals, which had failed to provide guarantees about their safety, the WHO added.
The firm has not yet commented.
The BBC has contacted Maiden Pharmaceuticals for comment.
Indian officials say they have asked the WHO to share evidence of the link between the syrups and the deaths.
The WHO identified the medicines as Promethazine Oral Solution, Kofexmalin Baby Cough Syrup, Makoff Baby Cough Syrup and Magrip N Cold Syrup.
The four products had been identified in The Gambia, but “may have been distributed, through informal markets, to other countries or regions”, the WHO added, in the alert published on its website.
It warned that their use may result in serious injury or death, especially among children.
The WHO’s intervention came after medical authorities in The Gambia – a popular tourist destination – detected an increase in cases of acute kidney injury among children under the age of five in late July.
The Gambia’s government has since suspended the use of all paracetamol syrups and has urged people to use tablets instead.
The number of deaths has declined since the ban but two more have been recorded in the past two weeks, Gambia health services director Mustapha Bittay told the BBC’s Focus on Africa programme.
He said that The Gambia did not currently have a laboratory capable of testing whether medicines were safe and so they had to be sent abroad for checking. Mr Bittay added that The Gambia was in discussions with the World Bank to get funding for a quality-control laboratory.
The WHO said that laboratory analysis of samples of the products “confirms that they contain unacceptable amounts of diethylene glycol and ethylene glycol as contaminants”.
The substances were toxic, and their effects “can include abdominal pain, vomiting, diarrhoea, inability to pass urine, headache, altered mental state and acute kidney injury which may lead to death,” it added.
Mr Bittay also said that traces had also been found of E.Coli, a bacteria which can cause diarrhoea and vomiting.
The Gambia’s health officials said last month that dozens of children had died, without giving an exact number.
Speaking in Geneva on Wednesday, WHO chief Tedros Ghebreyesus said: “The loss of these young lives is beyond heart-breaking for their families.”
The WHO said that India’s Central Drugs Standard Control Organisation indicated that the manufacturer may have only supplied the contaminated medications to The Gambia, AFP news agency reports, quoting an email from the UN health agency.
But the WHO said that “global exposure” was possible as the “manufacturer may have used the same contaminated material in other products and distributed them locally or exported” them, the agency reports.
See the four cough syrups below;