Been plagued by ulcers most of my life and can say yoghurt is your only "fermented" food that hurts, but helps it leave fast. Most, if not all, fermented foods are soaked in spices or acidic solutions (looking at you, vinegar). It is what it is, I have resigned myself to weeks of water and fresh "healthy" living, when the ulcers occur.