Adding oil, eggs and water to a boxed cake mix makes baking as simple and fool-proof as it can be, as long as you're able to use the specified ingredients. It gets a little more interesting when you need to replace a core ingredient, such as oil. Whether you've simply run out of oil or want to make your cake a bit healthier, there are several substitutes that you can turn to.
If you're simply out of vegetable oil and need options, many other fats can work. Shortening is simply vegetable oil that's been solidified, so you can use it as a substitute if you melt it and then let it cool until it's just warm. Some mixes might end up slightly denser if you use shortening. Hydrogenated shortening contains trans fats, so try to find a brand that's non-hydrogenated. Alternatively, you can use melted butter, which makes the cake taste slightly richer. Mayonnaise is made mostly of oil and can be substituted for the oil alone or for the oil and eggs. Its faint tang works especially well with chocolate cakes.
Fat contributes to the cake's richness and moist, tender crumb, so eliminating fat altogether can sometimes produce a less desirable result. Dairy products make good compromise replacements for oil in a boxed cake mix, because they add less fat but still contribute richness and moisture. You can replace the oil in most cake mixes with an equal quantity of sour cream, creme fraiche or plain yogurt. The mild acidity of the dairy products adds a faint but pleasant tang to the crumb, and the milk solids add both flavor and protein to the cake.
Pureed fruits or vegetables can be used as an alternative to oil, though they'll have more of an effect on the cake's final texture. Pureed pumpkin works well in chocolate cakes or spice cakes, where its own sweet earthiness adds depth to the original flavors. Mashed ripe bananas also work well as an oil substitute, though the banana flavor can be detected in white or yellow cakes. Applesauce is an effective substitute with a less assertive flavor. Applesauces vary widely in their moisture content, so you might need to also reduce the water your cake mix calls for. Add the applesauce first, then enough water to create a batter with the usual consistency.
Replacing the oil in your cake with non-fat ingredients can alter its texture, so you might need to make a few adjustments to make the substitution work. Adding an egg yolk can help the batter retain its richness and texture, at some cost in calories. Low-fat alternatives can leave your cake dry, so you might need to shorten the baking time or reduce your oven temperature by 10 degrees to compensate. Lower-fat cakes are more prone to sticking, so line your pans with parchment or spray them more heavily than usual with pan spray.