Issue Bug Closed

#65833return status 404 for non-numeric id GET-Parameter

Thomas Mayer 03/19/15, 02:22 updated 06/24/15, 16:58

Description

I just noticed a stupid sql injection attempt (which did not work):

/index.php?id=66%20or%20(1,2)=(select*from(select%20name_const(CHAR(111,108,111,108,111,115,104,101,114),1),name_const(CHAR(111,108,111,108,111,115,104,101,114),1))a)%20--%20and%201=1

It’s stupid because

(1,2)=(1,1) validated to false, if the statement was valid (and not true, as the comment 1=1 suggests). Stupid ololosher...

However, I was wondering why TYPO3 CMS 6.2.11 is returning page 66 for that expression.

Instead, I would expect TYPO3 CMS 6.2.11 to return status code 404 (page not found) and the 404-page.

For instance, I can’t find a security problem on that, as long as TYPO3 CMS does not execute the SQL.

But when using fail2ban and similar tools, I could handle 404-errors much easier.

I suggest to only allow numbers for the id parameter and return 404-errors for everything else.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.