Former Brazil defender Roberto Carlos has hit out at allegations he took illegal stimulants and vowed to take legal action against the German TV network that made them.

A documentary aired by the ARD network said the legendary full-back was named in a dossier given by Brazil's anti-doping agency to the public prosecutor's office in Sao Paulo in 2015.

Reuters was unable to independently verify the allegations in the documentary.

The former Real Madrid player called the allegations "extremely vague" and said his lawyers were taking action to refute them.

Roberto Carlos played with David Beckham (L) and Zinedine Zidane (R) at Real Madrid

"I vehemently repudiate the irresponsible accusations made by the German network ARD and reaffirm that I never used any artifice that gave me an advantage over my colleagues," Carlos said in a statement.

"All my career I have fought for fairness and above all loyalty.

"The lying accusations against me are completely against the way I think. In a career spanning more than 20 years I never tested positive for any substance that would modify my performance."

The Brazilian Football Confederation did not immediately respond to requests for comment on the issue.

The defender, who is currently a director at Real Madrid, won La Liga four times and the Champions League on three occasions with the Spanish club, as well as lifting titles in Brazil and Turkey with Palmeiras and Fenerbahce.