Ray writes …
Will WD40 strip Cosmoline from a firearm?
I can’t say for sure if the protective coating on a firearm is the same as what’s used on woodworking equipment. Folks have described the coatings, especially on old parts from military surpus, as being amazingly resistent to cleaners so it sure sounds like cosmoline.
I’ve seen people suggest a variety of concoctions and techniques to get rid of the coatings, most commonly to boil a rifle barrel to make sure you get that junk out of the rifling. I’d say that it certainly couldn’t hurt to try WD40. It’s a gentle, general-purpose solvent that shouldn’t harm anything like a wooden stock or aluminum components. And it’ll probably work. Let me know what you find!