An issue exists in includes/CommentFormatter/CommentParser.php in MediaWiki prior to 1.39.7, 1.40.x prior to 1.40.3, and 1.41.x prior to 1.41.1. XSS can occur because of mishandling of the 0x1b character, as demonstrated by Special:RecentChanges#%1b0000000.