An issue was discovered in the Tatsuya Kinoshita w3m fork before 0.5.3-31. Heap-based buffer overflow in the addMultirowsForm function in w3m allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via a crafted HTML page.
https://security.gentoo.org/glsa/201701-08
https://github.com/tats/w3m/issues/21
https://github.com/tats/w3m/blob/master/ChangeLog