Some studies show onion extracts may inhibit viruses. Onions contain compounds that help boost immunity and potentially shorten colds.