(CNN) Chinese scientist He Jiankui sent shockwaves around the world last year with his claim that he had modified twin babies' DNA before their birth. The modification was made with gene editing tool CRISPR-Cas9, he said, and made the babies resistant to HIV. Scientists from China and around the world spoke out about the experiment, which many say was unethical and not needed to prevent the virus. The scientist had also been warned by peers not to go down this path.

His experiments, which are still clouded with the uncertainty of his claims and his whereabouts, open a Pandora's box of questions around ethics in experiments with humans -- even though these dilemmas aren't new.

Historic examples of human experimentation include wartime atrocities by Nazi doctors that tested the limits of human survival. Another led to the creation of the hepatitis B vaccine prototype. Wendell Johnson, who made several contributions to the field of communication disorders, tried to induce stuttering in normally fluent children. In the 1940s , prisoners in Illinois were infected with malaria to test anti-malaria drugs.

Such experiments have been criticized as unethical but have advanced medicine and its ethical codes, such as the Nuremberg Code.

When He made his claim of genetically altering humans, the response from the global medical community was swift and condemning.

"It is out of the question that the experiment is unethical," said Jing Bao Nie, professor of bioethics at the University of Otago in New Zealand. Without "medical necessity, it is not ethical to carry out" gene editing.

Sarah Chan, director of the University of Edinburgh's Mason Institute for Medicine, Life Sciences and the Law, adds that the balance of risks and benefits make it hard to justify this experiment. Genome editing of embryos is still not fully established, and "virtually all scientists will say we don't yet know enough about It to be able to recommend that we just go ahead with it clinically," she said.

If it were the case of a life-threatening disease that will cause tremendous pain, and the only way to alleviate the pain would be a risky experimental procedure, then Chan thinks "given the immense benefit, we could produce perhaps taking that risk is justified."

When it comes to medical ethics, different principles need to be weighed against each other by an institutional review board, deciding over experiments involving human participants.

A definition of medical ethics

Medical ethicists and researchers commonly hold that there are seven general rules for an ethical experiment involving humans, explained Govind Persad, assistant law professor at the University of Denver.

Experiments should be socially valuable and scientifically valid, and people have to be selected fairly and respected. The risks and benefits to participants and the benefits to society need to be weighed against each other, and there needs to be an independent outside review of the ethics of the experiment, Persad said.

The risks and benefits equation sometimes includes third-party consideration, such as tests of a vaccine that includes a virus that can "shed" and infect others who are not research participants, Persad said. Research on smallpox vaccine is one example

If He's experiment produced any mutations, these could be passed down to the twins' children and then diffuse into the general population, which didn't consent to that change, Persad explained.

"I don't know how large of a risk that is," Persad said. "Because again, it depends on the odds of the mutation, whether the mutation was one that would end up staying in the population or whether it would be selected out over time."

Many of national and international protocols, like the 2005 UN Declaration on Human Rights and Bioethics , include some of these seven principles, Persad said. But as with most international documents, these protocols are not legally binding.

The first document outlining how research should be done in a fair way was a product of Nazi war atrocities.

The Nuremberg Trials began November 20, 1945, in Germany.

During the 1940s, Nazi doctors conducted human experiments on prisoners in concentration camps. In all of these experiments, which one study by the Jewish Virtual Library describes as "acts of torture," prisoners were forced into danger, nearly all enduring mutilation and pain, and many experiments had fatal outcomes. Most famously, experiments were conducted by Dr. Josef Mengele , who was interested in twins and performed "agonizing and often lethal" research on them.

Renate Guttmann was one of the "Mengele Twins," according to the Holocaust Encyclopedia, subjected to experiments such as injections that made her vomit and have diarrhea, and blood being taken from her neck.

Twenty Nazi doctors were sentenced in the 1945-46 Nuremberg trials. The process resulted in the first ethics document, the Nuremberg Code , a 10-point declaration on how to conduct ethical scientific research.

But some doctors felt that this code did not apply to them.

A decade later, pediatrician Dr. Saul Krugman was asked to do something about rampant hepatitis in the Willowbrook State School for children with intellectual disabilities on Staten Island, New York. Krugman found that over 90% of children at the school were infected.

Contracting hepatitis was "inevitable" and "predictable" due to poor hygiene at the overcrowded school, according to the first study Krugman and his colleagues carried out in Willowbrook. He decided to try to develop a vaccine, and parents were informed and asked for consent.

Krugman's experiment helped him discover two strains of hepatitis -- A and B -- and how these spread, A spreading via the fecal-oral route and B through intimate contact and transfer of body fluids. Fifteen years later, he developed a prototype hepatitis B vaccine.

In his paper, Krugman agrees with criticism that the ends do not justify the means but says he does not believe that to apply to his own work, since all children at the school were constantly exposed to the risk of acquiring hepatitis.

The subsequent debate pointed out that the central ethical question around Krugman's work is whether it can be acceptable to perform a dangerous experiment on a person, in this case the Willowbrook students, who will themselves see no benefit from it.

Kelly Edwards, professor of bioethics at the University of Washington, thinks back to the needed balance of risks and benefits in an experiment. "We had a trend of saying 'this group of people is already suffering,' " she says, which inspired researchers to study these populations for some generalizable knowledge that would help others. "But we still are really taking advantage of this one group of people suffering."

She believes there are now other methods that would have brought the same results. But because the vaccine was acquired in this unethical way and we are using the "tainted data" -- results from unethical experiments -- Edwards says we owe some recognition to "the children who contributed to that knowledge."

Tainted medical past

The need for retribution and compensation is found in a famously unethical experiment: the Tuskegee syphilis study. Syphilis was seen as a major health problem in the 1920s, so in 1932, the US Public Health Service and the Tuskegee Institute in Alabama began a study to record the natural progression of the disease.

The study observed 600 black men, 201 of whom did not have the disease. In order to incentivize participants, they were offered free medical exams, meals and burial insurance. But they were not informed of what was being investigated; instead, they were told that they would receive treatment for "bad blood" -- a local term that the Centers for Disease Control and Prevention says was used to describe several illnesses, including syphilis, anemia and fatigue.

Those who carried the diseases were not treated for syphilis, even when penicillin became an effective cure in 1947.

After the first reports about the study in 1972, an advisory panel was appointed to review the Tuskegee study. Their conclusion was that the knowledge gained "was sparse" compared to the risks to the subjects. The study concluded in October of that year.

Shortly after, a class-action lawsuit was filed on behalf of the participants and their families. A $10 million settlement was reached.

The Tuskegee Health Benefit Program was established to pay compensation such as lifetime medical benefits and burial services to all living participants and their wives and children. President Bill Clinton publicly apologized for the study in 1997

Edwards noted that many medicines and vaccines now in routine use were obtained initially through unethical means, "and some of them are not even as much on our consciousness."

The birth control pill was tested in 1955 on women in Puerto Rico who were not told that they were involved in a clinical trial or that the pill was experimental and had potentially dangerous side effects.

The 1979 Belmont Report into ethical guidelines for scientific research made informed consent US law and therefore such experiments illegal.

The commission responsible for the Belmont report also wrote topic-specific reports, one of which was on the use of prisoners in experiments. "It was a pretty widespread practice to use prisoner populations," Edwards said, because it was seen as offering them a way to repay their debts to society.

One place where prisoners were used in experiments was Holmesburg Prison in Philadelphia in the 1950s. Dermatologist Dr. Albert M. Kligman, famous for patenting the acne treatment Retin-A, conducted many tests on these inmates. Retin-A was partially based on Kligman's experiments on prisoners at Holmesburg, according to a report . Some included studying the reaction to dangerous chemicals, such as dioxin , an Agent Orange ingredient, the removal of thumbnails to see how fingers react to abuse, or the infestation of inmates with ringworm

Holmesburg Prison, in the northeast section of Philadelphia, in 1970.

One psychiatrist working at Holmesburg at the same time as Kligman reported that tranquilizers, antibiotics and Johnson & Johnson toothpaste and mouthwash were all tested on inmates, according to Sana Loue in " Textbook of Research Ethics : Theory and Practice."

Participating in these experiments was one of way for prisoners to earn money and a further means to control them, Loue said.

Prisoners' inability to give consent because their lives are completely controlled by others and the large risk of coerciveness are what inspired the Belmont report to rule out experiments with this vulnerable population, Edwards said.

The present and future of ethics

The reports that followed these experiments were used to draw up laws and governance bodies, such as institutional review boards. These boards are made up of a small group of representatives from the institution that would like to carry out the experiment and one non-scientific community representative; they decide whether an experiment is ethical and should go ahead.

Get CNN Health's weekly newsletter Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

Edwards says the institutional review boards offer a small one-time assessment of the situation. She hopes for more ongoing ethical review practices during experiments, like data safety monitoring, used mainly in clinical trials. This monitoring tool can halt an experiment at any time.