Place rack in the upper third of the oven, and preheat the oven to 350ºF. Line 2 cupcake pans with foil or paper liners. Set aside.
In a medium bowl, whisk together flour, cocoa powder, salt, baking powder, and baking soda. Set aside.
In a large bowl, whisk together sugar, oil, avocado, water, vinegar, and vanilla. Add the flour mixture to the avocado mixture and use a whisk or spatula to thoroughly combined.
Place the batter in a large liquid measuring cup and pour evenly into the prepared paper liners. Fill about ¾ full. Place the pan in the upper third of the oven. Bake for 18-20 minutes or until a toothpick inserted into the center of the cupcake comes out clean. Let the cupcakes cool in the pan for 10 minutes before transferring onto wire racks to cool completely.
To make the frosting:
Place cream cheese in the bowl of an electric mixer fitted with a paddle attachment. Beat the cream cheese for 1 minute to make it soft and pliable. Stop the mixer and scrape down the sides of the bowl. Add the butter and beat on medium speed for 1 minute, until thoroughly combined. Turn the mixer on low and add the powdered sugar followed by the vanilla extract. Beat until almost incorporated. Stop the mixer and scrape down the sides and bottom of the bowl. Beat on medium speed until all of the powdered sugar is incorporated and the mixture is velvety soft. Use immediately or store in an airtight container for in the refrigerator for up to 7 days. Bring to room temperature before spreading on cakes.