Anyone know a medication for mouthsores?

A few. Cankaid and oragel are topical anesthetics that have Benzocaine that can help with the pain. There are also some creams that can help with healing as well. Usually the sores are viral and difficult to get rid of, more treat the symptoms. Usually run their course in a week or two. If extreme you may take an rx antiviral to help. See your provider.
Mouth sores. Talk to doctor or dentist. Aphthasol (amlexanox) paste may help. Depends on nature of the sores.