Heat the oven to 400°F (200°C) and set out a nonstick 24-cup mini muffin pan.
Unfold each puff pastry sheet and cut it into 12 equal squares, trimming the edges if needed so each square fits a muffin cup.
Press one pastry square into each cup, letting the corners rise above the pan, then add one brie cube to each.
Top each brie cube with about 1 teaspoon cranberry sauce, then sprinkle the chopped pecans and rosemary evenly over the cups.
Brush the exposed pastry edges lightly with the beaten egg so they bake to a shiny golden color.
Bake for 15 to 17 minutes, until the pastry is puffed and deeply golden and the cheese is bubbling at the edges.
Cool the bites in the pan for 5 minutes, then loosen them gently and transfer them to a serving platter.