Cherry pits contain cyanide, which is poisonous to dogs. Even a small amount of cyanide can cause serious health problems, and ingesting a large amount can be fatal.
In addition to the pits, the flesh of cherries can also be harmful to dogs. Cherries contain sorbitol, which is a sugar alcohol that can cause gastrointestinal upset, including diarrhea and vomiting.
If your dog has eaten a cherry, it is important to contact your veterinarian immediately.