Can yeast extracts, such as vegemite and marmite treat ulcers within your mouth?
I found many personal anecdotes recommending Vegemite and/or Marmite for mouth ulcers. However, I have not found a study that shows that Vegemite and/or Marmite actually work. I also found a personal anecdote that Marmite actually caused and worsened ulcers.
Some patients with recurring ulcers were found to be deficient in vitamin B12. [ Nutritional deficiencies in recurrent aphthae. Wray D, Ferguson MM, Hutcheon WA, Dagg JH. J Oral Pathol. 1978;7(6):418-23. doi:10.1111/j.1600-0714.1978.tb01612.x. PMID 105102.]
Vitamin B12 (in pill or injection form?) was found to be effective as a treatment for recurring ulcers (regardless of whether deficiencies were initially present) in a small placebo-controlled, double-blind trial. [Volkov I, Rudoy I, Freud T, et al (2009). "Effectiveness of vitamin B12 in treating recurrent aphthous stomatitis: a randomized, double-blind, placebo-controlled trial". J Am Board Fam Med 22 (1): 9–16.doi:10.3122/jabfm.2009.01.080113. PMID 19124628.]
So, that raises the question whether the application of Vegemite or Marmite may help through the ingestion of B12.
Vegemite, however, contains no B12! [Source: Wikipedia, and not contradicted by the jar of Vegemite I consulted, that lists B1, B2 and B3 levels.] Marmite, on the other hand, is rich in B12. [Source: Wikipedia]
In conclusion, I found no scientific evidence that Vegemite or Marmite might help ulcers topically (although I may have missed it). I found a plausible mechanism where a diet rich in B12 (including Marmite, but not aided by Vegemite) might assist in reducing the recurrence of Aphthous ulcers.
I would highly recommend consulting a doctor (who has a wide range of clinically-tested treatments to address mouth ulcers), rather than relying on ill-considered folk remedies you hear about on the web.