In a medium saucepan over medium heat, whisk cocoa powder, cornstarch, sugar, and milk together. Bring to a boil, boil until the pudding has thickened.
Remove from heat, stir in butter and vanilla extract. Pout into a bowl, cover with plastic wrap and refrigerate until serving.