Corrosion was a natural process that breaks down metals caused by corrosive agents.
One of the remains at the abandoned Terra Nova colony was a corroded bicycle. (ENT: "Terra Nova")
The Horta on Janus VI used a natural corrosive agent to dissolve away the metal and nearly disintegrate the automatic machinery, piece by piece, used by the miners on the planet. According to Chief engineer Vanderberg, prior to determining the cause of the corrosion, "There was no reason for it, and our chemists were unable to analyze the corrosive agent." (TOS: "The Devil in the Dark")
In 2269, Leonard McCoy said that the cosmic cloud creature had the potential to corrode the hull of the USS Enterprise. (TAS: "One of Our Planets Is Missing")
In 2371, corrosive atmospheric specifications created for the Yalosian ambassador who was about to visit Deep Space 9 corroded the carpet in one of the quarters. (DS9: "Improbable Cause")
The schematics of the USS Voyager Quarren found in the Cyrik Ocean were severely corroded. This exacerbated mistakes in Voyager's depiction in The Voyager Encounter, which was inaccurate to begin with due to the Kyrians' warped perception of the ship and her crew. (VOY: "Living Witness")