The mass loss in massive stars is an important process that determines their future evolution and affects their circumstellar environments. Besides the continuous outflow of matter in the form of stellar winds, massive stars undergo sporadic mass ejections that lead to the formation of circumstellar envelopes. For now it remains unclear at what stage of evolution the first mass ejection occurs and what instabilities lead to it. We present the results of a study of four B-type stars with circumstellar nebulae that have recently been found in the archive of the Wide-field Infrared Survey Explorer (WISE), as well as a list of newly detected nebulae around classical Be stars and
$\beta$ Cephei variables up to 13 mag.