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

Possible XSS vulnerability #188

Open
enferas opened this issue May 14, 2021 · 5 comments
Open

Possible XSS vulnerability #188

enferas opened this issue May 14, 2021 · 5 comments

Comments

@enferas
Copy link

enferas commented May 14, 2021

Hello,

I would to report for a possible XSS vulnerability.

In file "explorerfile.php"

// line 22
// the source
$sid = empty($_GET['sid']) ? 0 : $_GET['sid'];//id
// line 149
$return = array(
        'sid' => $sid,
        'total' => $total,
        'data' => $data ? $data : array(),

        'folderdata' => $folderdata ? $folderdata : array(),
        'param' => array(
            'disp' => $folder['disp'],
            'view' => $folder['iconview'],
            'page' => $page,
            'perpage' => $perpage,
            'bz' => $bz,
            'total' => $total,
            'asc' => $asc,
            'keyword' => $keyword,
            'localsearch' => $bz ? 1 : 0
        )
    );
// line 167
// the sink, the output of exit function will be print it for the user.
exit(json_encode($return));
@waseeld
Copy link

waseeld commented Dec 4, 2021

hello bro where i can find this file "explorerfile.php" ??

https://github.com/zyx0814/dzzoffice/search?q=explorerfile.php&type=

as you can see it is looks like there is no file called explorerfile.php since now ??

@waseeld
Copy link

waseeld commented Dec 4, 2021

okay now i find it at /dzz/system/fileselection/explorerfile.php i am sorry and thank you for your greate report ...

there any patch ??

@enferas
Copy link
Author

enferas commented Dec 7, 2021

Thank you for your response.

json_encode can be vulnerable for some specific inputs and here is an example.

<?php
$output = ["A"=>"<img src='#' onerror=alert(1)>","B"=>"Safe"];
echo json_encode($output);

@enferas
Copy link
Author

enferas commented Dec 7, 2021

CVE-2021-43673 is assigned for this report.

dzzoffice 2.02.1_SC_UTF8 is affected by a Cross Site Scripting (XSS) vulnerability in explorerfile.php. The output of exit function will be print for the user exit(json_encode($return)).

@enferas
Copy link
Author

enferas commented Dec 8, 2021

I would like to report for similar vulnerability in admin/setting/permgroup.php

//line 16
$pername = isset($_GET['pername'])? trim($_GET['pername']):'';
//line 35
$setarr = array(
        'pername'=>$pername,
        'perm'=>$groupperm,
        'default'=>isset($_GET['default']) ? intval($_GET['default']):0
    );
//line 47
exit(json_encode(array('success'=>array('id'=>$insert,'pername'=>$setarr['pername'],'perm'=>$selectperm,'default'=>$setarr['default']))));

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