It's believed they were given Omeprazole, which is used to treat certain stomach and esophagus problems as part of a formula.
However, an affected batch of the medicine - from lot 11072/10/42 - is said to have been contaminated with minoxidil - an alopecia remedy, according to local reports.
The Spanish Agency of Medicines and Medical Devices has confirmed the outbreak of hypertrichosis, commonly known as 'werewolf syndrome'.
The syndrome causes an excess production of hair, either in one specific area or all over the body. It's not known what usually causes it, however, it's thought to be passed down genetically.
An investigation by the agency found that a labelling mix-up at the pharmaceutical company Farma-Química Sur resulted in the children accidentally being given medication that caused excessive hair growth.
In one case it caused an affected baby to grow hair rapidly across his body, reported El País.
'My son’s forehead, cheeks, arms and legs, hands became covered in hair … He had the eyebrows of an adult. It was very scary because we didn’t know what was happening to him,' said Ángela Selles, mum to Uriel who was affected from six months old.
When the children and babies stopped taking the formula their hair growth began to subside.
Parents have been urged to seek medical advice if their child has been given formula from the contaminated batch