It works great to keep carved and un-carved pumpkins looking good for many years. Spray the oil all over the pumpkin to make it look great, or put a coat of oil on each nook and cranny to keep it looking great. WD-40 is made from mineral oil, which causes it to be flammable.
Some oils - like those found in avocado, sesame, olive, tea tree, almond, and grapefruit seed extract - help to lock in moisture so your pumpkin stays moist. Use disposable gloves when applying oil to the outside of a pumpkin or any pumpkin cut-outs.