I have a 1999 Forester with a manual transmission. Last winter and again this winter, after driving on wet roads that have been treated with salt, the speedometer stops working. That is, the indicated speed immediately drops to zero. The effect is temporary, though. After a few hours of drying out, the speedometer starts working again. Once exposed to salt, driving in merely wet conditions with no additional salt will also cause the speedometer to fail until the salt is washed out or off of whatever it is affecting. So during this last summer, wetness caused no problems, the salt having been washed away, but the speedometer intermittency returned after the first ice storm this season. Because of this clear dependency on enviromental conditions, I don't suspect the usual '99 model year speedometer head problems as being the culprit.
I was thinking it was saltwater getting into the plug on the speed sensor, which is located fairly low on the transmission, so this fall I blocked all the openings in the plug with putty, but it hasn't prevented the problem. The voltages delivered to the speed sensor are always right on spec, so far.
One further clue: when the speedometer is in failure mode, stepping on the brake causes it to work again--but only as long as the brake pedal is depressed. Apparently there's some interaction with the ABS, but at least the ABS is still fully functional, since the speedometer is always working when braking .
Occasionally the failure turns on the MIL with a speed sensor failure code, but the car is not functionally affected otherwise.
If it's not the plug getting salted, what is it? The speed sensor itself is inside the transmission, and ought not to be affected by moisture or salt.