LS simple guestbook - arbitrary code execution

2007.04.19
Credit: jGammarays
Risk: High
Local: Yes
Remote: Yes
CWE: CWE-Other


Ogólna skala CVSS: 7.5/10
Znaczenie: 6.4/10
Łatwość wykorzystania: 10/10
Wymagany dostęp: Zdalny
Złożoność ataku: Niska
Autoryzacja: Nie wymagana
Wpływ na poufność: Częściowy
Wpływ na integralność: Częściowy
Wpływ na dostępność: Częściowy

######################################################## # Special Greetings To - Timq,Warpboy,The-Maggot # ######################################################## File: index.php Affects: LS simple guestbook (v1) Date: 15th April 2007 Issue Description: ======================================================================== === LS simple guestbook fails to sanitize user input that it writes to the posts.txt file when the user leaves a message, this file is then included causing any php code within it to be run. ======================================================================== === Scope: ======================================================================== === An attacker can inject arbitrary php code and potentially execute commands on the system. ======================================================================== === Recommendation: ======================================================================== === Add the following line of code in index.php: $message = strip_tags($message); just above: if ($message != "") {$file = fopen("$dataf","a"); ======================================================================== === Example: name = Test message = <?php phpinfo(); ?> Discovered By: Gammarays


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top