Are cherries with worms safe to eat?
Generally speaking, it is not recommended to eat cherries that contain insects to avoid discomfort. The detailed explanation is as follows:

The most common insects found in cherries are fruit fly larvae. Fruit flies are usually attracted by the aroma of cherries and lay eggs on the fruit's surface. After hatching, the larvae burrow into the flesh. As the larvae move within the cherry, they may cause localized damage to the fruit, making it easier for microorganisms to invade. These microorganisms can multiply on the damaged areas of the fruit and potentially produce toxins. Consuming cherries containing large amounts of harmful microorganisms and their toxins may lead to food poisoning, causing symptoms such as nausea, vomiting, and diarrhea.
From a psychological and sensory perspective, most people experience a strong sense of disgust when finding insects in food. This psychological reaction may make it difficult for individuals to accept cherries containing insects. Even if consuming a small number of insects might not be harmful, people may still refuse to eat them due to psychological discomfort.
Before consumption, cherries can be soaked in lightly salted water for 15–20 minutes. This can cause any hidden fruit fly larvae within the flesh to emerge and float to the surface. Soaking in salt water can also help disinfect and reduce surface bacteria.