A reporter for the BBC programme Inside Out posed as the father of a six-month-old baby and bought milk from 12 mothers across the country.
His purchases were then analysed by microbiologists at Coventry University who discovered a third of the samples contained E.coli, two contained Candida (thrush) and one contained the bacteria pseudomonas aeruginosa, which caused the deaths of four babies in in Northern Ireland in 2012.
PA reports that websites including onlythebreast.co.uk have classifieds sections for people buying and selling breast milk. There is also a section for men who wish to buy breast milk or who are interested in being breastfed.
Dr Sarah Steele from Queen Mary University of London told Inside Out parents have "heard the message breast is best, which is absolutely the case but this is stuff bought off the internet.
"You don't know the seller, you don't know how they've been storing it, you don't know what it contains and, more pertinently, they're often doing this for profit and that poses the risk that they may tamper with it, water it down, be it with water, formula, cows milk or soya milk."
The BBC investigation comes after a survey by Netmums found that one in 50 mums are sharing breastmilk through free online websites.
However, many mums disapprove of websites offering breast milk for profit, as the survey found that one third of mums believe the sale of breastmilk should be banned and it should only ever be offered for free to families in need.
In June, researchers from Queen Mary University of London (QMU) warned that buying breast milk online was a danger to health as it was "unpasteurised" and "poses many risks" including exposure to diseases such as HIV, hepatitis B and C, and syphilis.
The researchers found that some 93% of breast milk sold online contains detectable levels of bacteria due to how it is expressed and stored.
Writing in the Journal of the Royal Society of Medicine, Dr Sarah Steele said: "Milk bought online poses more risks than proven benefits."
A safer alternative for women who wish to donate surplus breast milk to help premature babies is to go through NHS milk banks.
"However, receiving milk from official, regulated milk banks is very safe as they ensure donations are collected and stored to the highest standard.
"The UK Association for Milk Banking provides tested and pasteurised breastmilk from rigorously screened donors. This can be a life-saving service for premature and sick babies."
According to the European Milk Bank Association (EMBA), every year in the UK more than 1,500 donors provide over 6,500 litres of milk to regulated milk banks, which goes to feed premature babies and babies recovering from gut surgery.
The EMBA also states that mums should be aware of the risks of sharing milk.
In a statement, they said: "The main risks of sharing milk are that it is contaminated with pathogenic bacteria or that it contains viruses such as HIV, Hepatitis or HTLV (Human T Lymphotropic Virus).
"In addition, the shared milk may contain medications taken by the mother as well as alcohol, nicotine, drugs and other contaminants.
"Screening of donors, milk testing and appropriate pasteurization, as routinely done in human milk banks, greatly reduces the risks associated with sharing breastmilk.
"We advise all parents to be aware of the risks involved in feeding a baby with another mother’s milk and before doing so to consult a qualified healthcare professional such as a paediatrician, neonatologist or hospital infant feeding specialist."
More information about milk sharing and milk banks is available on the NCT website.