The Prophet ﷺ said, "The one who dies of a stomach ailment is a martyr, and the one who dies of plague is a martyr."
عن النبي ﷺ قال: المبطون شهيد، والمطعون شهيد.
No references are available.
Bukhari related it in the Book of Medicine (5733), and Muslim in the Book of Leadership (1915), both through Abu Salih, from Abu Hurairah, who mentioned it. The wording given is Bukhari's.