I was doing a ghusl and while I was doing it, my back hit an object and fresh blood came out. It was not dripping but it was slowly coming out. That part where I got hit was already washed. So then I washed the other parts according to law and completed the ghusl without touching the injured spot and blood. My ghusl is valid?

Your ghusl is ok