The invention relates to a device for detecting the corrosion induced by a medium on a structure. The device comprises a chamber (5) closed by a closing disc (4) made of such a material that the disc becomes permeable to the medium once corroded by the medium, and means for measuring the refractive index of the medium present in the chamber. According to a preferred embodiment, an optical fiber is used to measure the refractive index variation.