I tend to think of WD40 as a 'Jack of all trades master of none'
As far as I know it is water based. This came up when there was talk of it containing silicone and being potentially harmful to catalytic converters, which as far as I know it is not. I've had problems with it damaging certain paint finishes and 'O' ring materials.There are better rust solvents,better lubricants and better corrosion preventatives available. I seem to remember an article in the Daily Telegraph (UK) where Dr James Le Fanu suggested spraying it in arthritic joints.