The salamander's reputation for surviving fire produced a trade as well as a legend, and the trade is the part that can be verified.
Cloth woven from asbestos fibre has the property the legend needed: it can be thrown into a fire and drawn out clean and undamaged, the burning simply removing whatever has soiled it. Such cloth circulated in the medieval and early modern world under the names salamander wool, salamander's hair and salamander skin, and it was sold, and bought, on the understanding that it came from the animal. A cloth that cleaned itself in flame was worth a great deal, and an origin story that explained the property was part of what was being sold.
Marco Polo saw through it. Describing a mining district he places in Chinchintalas, he reports a substance dug out of the ground as veins in the rock, pounded, washed and spun into thread, from which cloth is made that is cleaned by fire. He states directly that the salamander is not a beast, as people in his part of the world believed, and that what they were being sold was a mineral. Whether he saw the workings himself or reported them at second hand is disputed, but the identification is correct and it is several centuries ahead of the natural history writing around it.
The false etymology has outlived the correction in one place. Chemists gave the name asbestos to the mineral from a Greek word for unquenchable, so both the animal and the rock ended up named for the same property, and only one of them ever had it.