Coronal mass ejections (CMEs) are huge expulsions of magnetized matter from the Sun and stars, traversing space with speeds of millions of kilometers per hour. Solar CMEs can cause severe space weather disturbances and consumer power outages on Earth, whereas stellar CMEs may even pose a hazard to the habitability of exoplanets. While CMEs ejected by our Sun can be directly imaged by white-light coronagraphs, for stars this is not possible. So far, only a few candidates for stellar CME detections are reported. Here we demonstrate a different approach, based on sudden dimmings in the extreme-ultraviolet (EUV) and X-ray emission caused by the CME mass loss. We report dimming detections associated with flares on cool stars, indicative of stellar CMEs and benchmarked by Sun-as-a-star EUV measurements. This study paves the way for comprehensive detections and characterizations of CMEs on stars, important for planetary habitability and stellar evolution.