LS simple guestbook - arbitrary code execution

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


CVSS Base Score: 7.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

######################################################## # 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 2022, cxsecurity.com

 

Back to Top