The invention relates to a needle safety device for a medical device. The needle safety device includes: a base portion having a bore extending therethrough for receiving a needle; and two opposing jaws extending from the base portion each having a head portion in the region of its free end. At least one of the head portions forms a locking shoulder for securing the needle safety device in a housing of the medical device. An elastic element surrounds the jaws in a region between the base portion and the head portions. The jaws can be spread apart against a restoring force of the elastic element in order to allow the needle received in the bore to extend all the way-through the needle safety device. The invention also relates to a needle for a medical device and to an intravenous catheter apparatus comprising a needle and a needle safety device.