Preheat oven to 350°F and line a muffin tin with cupcake liners.
In a bowl, whisk together flour, cocoa powder, baking soda, baking powder, and salt.
In another bowl, beat sugar, oil, eggs, and vanilla until smooth.
Add the dry ingredients to the wet ingredients, alternating with buttermilk, mixing just until combined.
Stir in hot water and peppermint extract until the batter is smooth.
Divide batter evenly among liners, filling about two-thirds full.
Bake for 18–20 minutes or until a toothpick comes out clean. Let cool completely.
For the frosting, beat butter until creamy. Add powdered sugar, cream, and peppermint extract, and beat until fluffy.
Frost cooled cupcakes and sprinkle with crushed candy canes.