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
To delete the administrator user admin, for example, first register any account, and then modify the username admiN or directly register an account named admiN account,then delete the account with the name admiN,at this point the admin account was maliciously deleted.
The source code that creates the vulnerability is as follows,the code delete the lowercase account that corresponds to the user name.
cursor.execute(
"""delete from users where lower(userName) = ? """, # Delete the row from the users table where the lowercased userName column matches the lowercased given userName
[
(userName.lower())
], # Use the lowercased version of the userName and a parameterized query to avoid SQL injection
)
3、Arbitrary article deletion
As the back-end did not verify that the user sending the request is the author of the article, click to delete one of their own articles and grab the traffic packet, the logic is to send a post request to /post/{postTitle}, which postTitle for any article title, here in the burp will be changed to someone else's title of the article can be deleted from other people's articles
POC:
The source code that creates the vulnerability is as follows,The backend does not validate the input query.Here query passes in % or _ to get all the full usernames
@searchBlueprint.route("/search/<query>", methods=["GET", "POST"])
def search(query):
# Replace the %20 and + characters in the query with spaces
query = query.replace("%20", " ")
queryNoWhiteSpace = query.replace("+", "")
queryUsers = cursor.execute(
"""select * from users where userName like ? """,
[
("%" + queryNoWhiteSpace + "%"),
],
).fetchall()
The text was updated successfully, but these errors were encountered:
Thank you @coleak2021 for the detailed report, I’ll fix these issues as soon as possible. Also, thanks to @brandon-t-elliott for reaching out via email and sharing feedback. I appreciate both of you for helping improve the project and have credited you accordingly.
I found the following security risks in this framework:
1、stored xss
2、Arbitrary account deletion
3、Arbitrary article deletion
4、All usernames leaked
Here is the specific information:
1. stored xss
Post an article, put a malicious payload in postContent, postTags, postTitle respectively, all three places can trigger XSS.
POC:
2、Arbitrary account deletion
To delete the administrator user admin, for example, first register any account, and then modify the username admiN or directly register an account named admiN account,then delete the account with the name admiN,at this point the admin account was maliciously deleted.
The source code that creates the vulnerability is as follows,the code delete the lowercase account that corresponds to the user name.
3、Arbitrary article deletion
As the back-end did not verify that the user sending the request is the author of the article, click to delete one of their own articles and grab the traffic packet, the logic is to send a post request to /post/{postTitle}, which postTitle for any article title, here in the burp will be changed to someone else's title of the article can be deleted from other people's articles
POC:
4、All usernames leaked
The source code that creates the vulnerability is as follows,The backend does not validate the input query.Here query passes in
%
or_
to get all the full usernamesThe text was updated successfully, but these errors were encountered: