The magnets themselves are ferrite, this is a ceramic material that is man made and can be magnetized, it cannot corrode, this is the same material almost all impeller magnets are made from. These magnets are mounted on an iron plate that is coated by polyurethane, the black filling you see around the magnets. One of two things is happening and just to put you at ease, nothing in these magnets is toxic, their is no nickel, zinc, rare earth elements, etc, just an iron plate, inert plastics and the ferrite magnets.
1) The magnet at some point picked up something magnetic that has rusted, this could be iron filings, steel wool, iron based phosphate removers (which are essentially rust) or even a staple or some other foreign object. This is the most common issue especially when the rust is widespread.
2) A small pinhole is present and sea water has reached the iron plate, this is rare but can happen, when this is the cause, the stain will have a focal point and some sort of visible bubble or hole in the polyurethane will be the source, it may be extremely small though. The stain will radiate out from this point and usually be fairly localized.