Project

General

Profile

Actions

Bug #20886

closed

Probable Cross-Site Scripting Vulnerability in showpic.php

Added by Philipp Hagemeister over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-08-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

typo3-showpic.patch (666 Bytes) typo3-showpic.patch Administrator Admin, 2009-08-14 15:44
Actions

Also available in: Atom PDF