A safety needle having a rigid outer structure within which there is a cannula holding element of being movably coupled to an injector pen for a drug is provided. The cannula holding element supports a cannula having a first extremity and a second extremity for administration of the drug. A moving protective element associated with the rigid structure, covers the second extremity of the cannula after administration, with provision being made for a deforming member capable of deforming the cannula after administration of the drug so that the second extremity of the cannula remains within the protective element. The deforming member is associated with the protective element and is capable of rotating autonomously with respect thereto after administration of the drug to deform the cannula.