Cryptographp Local File Inclusion / HTTP Response Splitting

2012-05-19 / 2012-08-15
Credit: Lu33Y
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-98


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

During a security assessment, Ive found that my target was using Cryptographp which is a PHP script used for generate captchas. It was easily noticeable when Ive found the following URL: http://WWWW/cryptographp.inc.php?cfg=XX&sn=YYYY&ZZZZ So I've decided to take a look at the source code and Ive found 2 vulnerabilities. The first one has already been disclosed but hasnt been corrected. This vulnerability allows an attacker to execute arbitrary scripts on the host server by causing cryptographp.inc.php to include any arbitrary file existent in the same directory. Here is the vulnerable source code: if (is_file($_GET['cfg']) and dirname($_GET['cfg'])=='.' ) $_SESSION['configfile']=$_GET['cfg']; else $_SESSION['configfile']="cryptographp.cfg.php"; include($_SESSION['configfile']); The second vulnerability can be easily found but seems not to be revealed on Internet or on an exploit database. It is an HTTP Response Splitting which can be used to perform cross-site scripting attacks, cross-user defacement, web cache poisoning, and similar exploits. Here is the vulnerable source code: <?php Header("Location: cryptographp.inc.php?cfg=".$_GET['cfg']."&sn=".session_name()."&".SID); ?> For the mitigation of this two vulnerabilities, one simple rule: Input Validation Lu33Y -


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