This paper proposes an ethical framework for evaluating biosafety risks of gain-of-function (GOF) experiments that create novel strains of influenza expected to be virulent and transmissible in humans, so-called potential pandemic pathogens (PPPs). Such research raises ethical concerns because of the risk that accidental release from a laboratory could lead to extensive or even global spread of a virulent pathogen. Biomedical research ethics has focused largely on human subjects research, while biosafety concerns about accidental infections, seen largely as a problem of occupational health, have been ignored. GOF/PPP research is an example of a small but important class of research where biosafety risks threaten public health, well beyond the small number of persons conducting the research. We argue that bioethical principles that ordinarily apply only to human subjects research should also apply to research that threatens public health, even if, as in GOF/PPP studies, the research involves no human subjects. Specifically we highlight the Nuremberg Code's requirements of 'fruitful results for the good of society, unprocurable by other methods', and proportionality of risk and humanitarian benefit, as broad ethical principles that recur in later documents on research ethics and should also apply to certain types of research not involving human subjects. We address several potential objections to this view, and conclude with recommendations for bringing these ethical considerations into policy development.