A medical device for detecting a leakage of fluid on a subject (C) in an area of insertion of a cannula or needle (30) in the subject (C). The detection device (1) comprises a support (2), configured for being secured on the subject, and an optical sensor (10) on the support (2). The support (2) defines, in a region thereof comprised between the optical sensor (10) and a lower face thereof, a detection surface (4b, 9d) that can be reached by leakage fluid. The optical sensor (10) has a sensor body (11) with an emitter and a receiver of electromagnetic radiation, which is secured on the support (2) and is configured as a distinct part with respect thereto. The support (2) and the sensor body (11) have mutual-coupling means, for defining a predetermined position (9) of retention of the sensor body (11) on the support (2), in which position the emitter and the receiver are oriented towards the detection surface (4b, 9d) at a substantially predefined distance from said surface (4b, 9d), in such a way that a variation of at least one optical characteristic of the detection surface (4b, 9d) that is induced by the presence of leakage fluid can be detected via the optical sensor (10).