Researchers have identified people in the US who anonymously donated their DNA for use in medical research - raising concerns about privacy.
They could uncover a person's identity using records of donated DNA coupled with other readily available sources of information on the internet.
It was made possible because of large "genetic genealogy" databases which help people trace their family tree.
The study was reported in the journal Science.
Weak male link
There is a strong link in men between their surname and unique markings on the male, or Y, chromosome.
These genetic markings are a useful tool when investigating a family tree as they are passed from father to son and are used in "genetic genealogy" databases.
Researchers from the Whitehead Institute for Biomedical Research used this freely available data to create a computer program which could match unique markers to surnames.
This was used to hunt through an academic database - the 1,000 genomes project.
It contains the entire genetic code of volunteers who donated their DNA anonymously. The only record is of the donor's age and their home state.
The computer program, however, could now work out surnames as well. This was enough, combined with a basic internet search, to work out the identities of around 50 people.
One of the researchers, Yaniv Erlich, said: "This is an important result that points out the potential for breaches of privacy in genomics studies."
But he stressed very strongly that he would not want to see public sharing of genetic information curtailed, rather that people were aware of the realities.
"More knowledge empowers participants to weigh the risks and benefits and make more informed decisions when considering whether to share their own data.
"We also hope that this study will eventually result in better security algorithms, better policy guidelines, and better legislation to help mitigate some of the risks described."
The team shared their findings with officials at the US National Human Genome Research Institute who then removed ages of participants from the publicly-accessible genome database.
In an accompanying editorial Eric Green, director of the Institute, says there needs to be a balance between the rights to privacy of those taking part in research and the benefits to society to be gained from the sharing of biomedical research data.
Frances Rawle, head of policy at the UK's Medical Research Council, said: "This paper is useful and also timely as there is currently a great deal of discussion about the sharing of data both between researchers and more widely.
"The potential benefits to be gained from sharing genetic data relating to individuals must be balanced with the potential harm of unintended disclosure of personal information."
Prof Mark Jobling, a Wellcome Trust senior fellow at the University of Leicester, said if the same study was done in the UK the hit rate might be even higher because their had been less changing of surnames over time.
He added that a lot of effort was still required to identify individuals and even if someone had your genetic profile, most human traits are not easily predictable from DNA.
"When people sign up to genetic testing, you have to make it clear that that there is an outside chance someone could identify you. It is the very basis of informed consent."