Cracked Eggs & Safety
It does seem dangerous to me. You don't know where they have been before you bought them, so bacteria and other stuff can contaminate the eggs with their shell broken. You can safely eat the eggs that didn't break. Their shell and membrane protects them. The broken ones should be thrown away if you want to be sure you are safe.

This reference puts it this way:


  Cracks in the shells of eggs can allow bacteria or other pathogens to contaminate the egg and make you sick. While cooking does reduce the amount of most contaminants, it does not remove them completely.


And from the USDA:


  Bacteria can enter eggs through cracks in the shell. Never purchase cracked eggs. However, if eggs crack on the way home from the store, break them into a clean container, cover it tightly, keep refrigerated, and use within 2 days. If eggs crack during hard cooking, they are safe. Remember that all eggs should be thoroughly cooked.