The invention relates to a safety device for a syringe for avoiding stab wounds, said syringe having a syringe body and a piercing means arranged on the distal end of the syringe body. The safety device comprises a sleeve element that extends along an axial direction (X) and encloses at least partly the piercing means and the syringe body, and a collar element that can be arranged on a distal end region of the syringe body and locks the safety device in the axial direction (X), said collar element having at least one guide projection which engages at least one guide track of the sleeve element. The safety device is further characterized by having a cap element that can be arranged at least in sections on top of the sleeve element and by means of which the sleeve element can be locked with respect to the movement of the syringe body relative to the sleeve element.