Preheat your oven to 325°F and place the rack in the middle position. Prepare a cupcake tin either by lining with paper cups or by spraying liberally with nonstick baking spray.
In the bowl of your stand mixer fitted with the whisk attachment, add the flour, sugar, cocoa powder, baking soda, and salt and mix on low speed.
Slowly add the oil and buttermilk. The mixture will look chunky.
Increase the speed to medium-low and add the egg, combining well and scraping down the sides and bottom of the bowl.
Slowly add the coffee, vanilla, vinegar, and food coloring. Scrape down the sides and bottom of the bowl and mix the batter until just combined. Be careful not to overmix.
Divide the batter evenly among the prepared cups, filling each cup 2/3 of the way. Bake for 18-20 minutes, turning the pan halfway through baking. The cupcakes are done baking when an inserted toothpick comes out mostly clean with a few moist crumbs attached. Do not overbake.
Remove from the oven and let cool for 10 minutes in the pan, then remove the cupcakes from the pan and place on the serving platter. Let cool completely, about 30 minutes.
While cooling, make the frosting by adding butter and cream cheese to the bowl of your stand mixer fitted with the whisk attachment. Beat on high speed until it begins to thicken and become fluffy.
Next, reduce the mixer speed to low and add in the powdered sugar. Once all the sugar is incorporated, return the mixer to high to continue whipping, about 2 minutes.
Finally, add the salt and vanilla and stir in.
To assemble, pipe or scoop the frosting on top of the cooled cupcakes and serve.