You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested: title, image, auth, content, description did not check the input.Direct insertion into the database results in a storage-based XSS vulnerability.The auth is not displayed on the page so it is not triggered.
Visit the home page. http://127.0.0.1:8093/ (you ip and port)
Click on the article
All of the above parameters are triggered.
Vulnerability code:
app/article/model/ArticleModel.php
Line 64-99.
_ saveBefore() can be inferred from the name that the function is to do some processing before saving.
But this part of the code only determines the existence of content and description parameters.
Other parameters do not appear in this part of the code, so other parameters cannot be verified.
And only keyword is specially treated (htmlClear()).
Then we can insert malicious XSS payload.
Take a look at what is saved in the database.
Title, description, image, auth, save as is, content although there is escape operation, but it is still triggered in the previous page.
Only in the keyword parameter, < script > is filtered out.
When line 75 foreach is executed, < script > and < / script > are removed.
From the return value, you can see that the keyword is processed.
That is to say: the _ saveBefore () function is used to do some processing before saving, but only with keyword and no other parameters.
So other parameters accept malicious code that leads to this vulnerability.
The text was updated successfully, but these errors were encountered:
Project address: https://github.com/duxphp/DuxCMS3/
Preparation: log in to the background.
Vulnerability URL:
http://127.0.0.1:8093/s/article/Content/add?
POC:
Tested: title, image, auth, content, description did not check the input.Direct insertion into the database results in a storage-based XSS vulnerability.The auth is not displayed on the page so it is not triggered.
Visit the home page.
http://127.0.0.1:8093/ (you ip and port)
Click on the article
All of the above parameters are triggered.
Vulnerability code:
app/article/model/ArticleModel.php
Line 64-99.
_ saveBefore() can be inferred from the name that the function is to do some processing before saving.
But this part of the code only determines the existence of content and description parameters.
Other parameters do not appear in this part of the code, so other parameters cannot be verified.
And only keyword is specially treated (htmlClear()).
Then we can insert malicious XSS payload.
Take a look at what is saved in the database.
Title, description, image, auth, save as is, content although there is escape operation, but it is still triggered in the previous page.
Only in the keyword parameter, < script > is filtered out.
When line 75 foreach is executed, < script > and < / script > are removed.
From the return value, you can see that the keyword is processed.
That is to say: the _ saveBefore () function is used to do some processing before saving, but only with keyword and no other parameters.
So other parameters accept malicious code that leads to this vulnerability.
The text was updated successfully, but these errors were encountered: