Bug reports Found a bug? Post it here please.
Version 7.x > Bug reports > Elevation of privileges through Macro Expressions View modes: 
User avatar
Member
Member
philippe.leblond-cbd - 2/5/2013 6:36:20 AM
   
Elevation of privileges through Macro Expressions
The vulnerability exists due to insufficient validation of Macro Expressions. Successful exploitation of this vulnerability requires write access to a field or editable region where a Macro Expression is accepted. Permission to edit SQL code is not required.

A remote user can manipulate SQL queries and execute arbitrary SQL commands within application's database.

The following proof of concept demonstrates the vulnerability:

{% GlobalObjects.Users.Where("1=0) SELECT 1 FROM AllData\r\nUPDATE CMS_User SET UserIsGlobalAdministrator=1 WHERE UserName='test'\r\nCOMMIT--") %}


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/8/2013 5:26:04 AM
   
RE:Elevation of privileges through Macro Expressions
Hello,

Regrettably it was a bug. We have already fixed it in hotfix no.19. Please download it (or any later hotfix) and apply it to fix this issue. We are sorry for this inconvenience.

Best regards,
Juraj Ondrus