Boron diffusion out of the CoFeB layers in model systems with thick CoFeB and MgO layers grown by radiofrequency sputtering or electron-beam evaporation and in MgO-based magnetic tunnel junctions ͑MTJs͒ is probed after annealing by x-ray photoemission spectroscopy ͑XPS͒ and electron energy loss spectroscopy. Successive interfaces are exposed by ion milling the stacks, layer by layer, in the XPS system. Despite the presence of thick CoFeB and a high annealing temperature of 400°C, we found no boron in the MgO or at the MgO/CoFe interfaces. Similar results are also obtained in the MTJs.