A safety needle comprising a rigid outer structure (4) within which there is a cannula holding element (2) capable of being movably coupled to an injector pen for a drug, said cannula holding element (2) supporting a cannula (15) having a first extremity (16) and a second extremity (19) for administration of the drug, the moving protective element (55) being associated with the rigid structure (4, 28), said protective element covering said second extremity (19) of the cannula (15) after administration, provision being made for a deforming member (68) capable of deforming the cannula after administration of the drug in such a way that the second extremity (19) of such cannula remains within said protective element (55). The deforming member (68) is associated with said protective element (55) and is capable of rotating autonomously with respect thereto after administration of the drug to deform the cannula (15).