Bug #20886
closedProbable Cross-Site Scripting Vulnerability in showpic.php
0%
Description
In typo3/sysext/cms/tslib/showpic.php:222+226, user input is outputted in an HTML document without any transformation. Luckily, the input values are constrained by a check(about line 160) which die()s if an md5 checksum of the encryptionKey and the user input is not correct.
This setup is unnecessarily risky and complex. Furthermore, md5 is broken, especially when - as in this case - the attacker can insert nearly arbitrary values into the signed data. Additionally, the encryption key is not meant to be sufficiently random and is usually chosen by a human.
To prevent this XSS attack, the bodyTag, wrap, and maybe effects (less urgent, since filtered appropriately) GET/POST inputs should not be ignored. The md5 check may remain to prevent DoS attacks, but should be eliminated if possible because of usability and consistency issues. Generally, showpic.php should be cleaned up; all of the initialization code should be moved to a central location. The attached patch sets $bodyTag and $wrap to constant values before outputting them.
(issue imported from #M11721)
Files