Preheat the oven to 350 F. Spread the nuts on a small baking pan. Toast for about 7-9 minutes, until fragrant. Without letting them cool, transfer immediately to a food processor (or strong blender) and grind the nuts on high. First the nuts will turn into bits, then a powder. Keep processing until the powder turns into a runny paste, this can take up to 10 minutes depending on the strength of the food processor. Scrape the paste out and set aside to cool. This can be done ahead of time, store the pistachio paste in an airtight container in the fridge (it’ll keep for a week or two).
To make the cupcakes
Preheat the oven to 350 F. Line two cupcake tins with muffin/cupcake liners (parchment based).
In the bowl of a stand mixer add the sugar and softened butter, affix the paddle attachment and start beating on low, working up to medium speed. Look for the mix to become several shades lighter and fluffy. While it beats, add the salt and vanilla.
Once creamed, add the eggs one at a time, beating well after each addition. Add the pistachio paste and beat to combine.
Add the flour then turn the mixer on low, while it’s beating, slowly pour in the buttermilk. Stop as soon as the batter is evenly mixed.
Fill the cupcake liners about three quarters full. Bake until a cake tester comes out clean or they spring back when pressed. Let cool completely before frosting.