Cherry fruit, without stems or seeds, is safe for dogs. But the stems and seeds contain a low concentration of toxins called cyanogenic glycoside (cyanide, essentially). In order for the toxins to be released and to become toxic to a dog, the seeds and stems have to be broken by chewing.
More useful articles on a similar topic 👇
Can one cherry kill a dog?How many cherries are toxic to dogs?