There is reason to believe that certain types
of bacteria and/or viruses are responsible
for the painful mouth
sores. Canker
sores are not contagious and are not related to the herpes simplex virus, also known as cold sores.
See http://dentistry.about.com/od/basicdentalcare/f/cankercause.htm if you want to read the full article, its worth reading even if its just to read the list of possible causes.