Most people are aware that raw and undercooked eggs pose a food-poisoning risk.
But few realize that hard-cooked eggs are also very perishable and need to be treated with care. Eggshells are very porous, which is why most commercially produced eggs are coated with a thin protective layer of mineral oil. Cooking removes this coating, leaving hard-cooked eggs vulnerable to bacterial contamination. Two hours is the maximum total time that a perishable food can be exposed to temperatures over 40 degrees and still be safe to eat. Wash hands thoroughly before and after handling raw or cooked eggs.