Boil potatoes, onion, and garlic in salted water over high heat. Cook until tender, 15 minutes. Drain potatoes, reserving 1 cup cooking water. Return potatoes to pot over medium heat, and briefly to evaporate excess moisture.
Off heat, add oil and cayenne. Mash potatoes to desire consistency, adding reserved cooking water as needed if potatoes are too dry.