Other baked goods
TSA’s entry for pies and cakes is a yes for both bags (pie and cake have their own page). Its Thanksgiving notice for Denver, 23 Nov 2026, lists baked goods that are fine in a carry-on: “Holiday pies, cakes, cookies and brownies”.
Flying home from abroad
TSA’s answer covers screening at US airports. On the way home you go through the other airport’s screening first, and its rules are the ones that count there.
Coming home through US customs
CBP’s line is short: “You may bring bakery items and certain cheeses into the United States.”
Declare it either way. USDA says declared food brings no penalty, even when it’s refused. What happens if you don’t.
TSA puts this on every entry: “The final decision rests with the TSA officer on whether an item is allowed through the checkpoint.”