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

Multiple SQL injection #1841

Closed
bybit-sec opened this issue Sep 19, 2022 · 1 comment
Closed

Multiple SQL injection #1841

bybit-sec opened this issue Sep 19, 2022 · 1 comment

Comments

@bybit-sec
Copy link

重现步骤

https://github.com/hhyo/Archery/blob/v1.8.5/sql/slowlog.py#L167
The checksum parameter of the report interface is not escaped, and it is pass into the SQL statement for execution, results in SQL injection. Any logged-in user can execute SQL injection and steal other user's django session_key from database and can get DBA role permission.

https://github.com/hhyo/Archery/blob/v1.8.5/sql/db_diagnostic.py#L57
The parameter ThreadIDs of the create_kill_session interface is not converted to int type, resulting in SQL injection. Users in the DBA role can bypass query restrictions.

https://github.com/hhyo/Archery/blob/v1.8.5/sql/db_diagnostic.py#L88
The parameter ThreadIDs of the kill_session interface is not converted to int type, resulting in SQL injection, and because the result of the first SQL output is used as SQL statement, it will run again in the MySQL instance , results in Second Order SQL injection, can execution of arbitrary SQL statements, and users in the DBA role can bypass the SQL review process to execute arbitrary SQL statements.

预期外的结果

SQL injection without priveleges and SQL injection modify any data bypass the SQL review restrict. Any login user can combine these vulns to execute arbitrary SQL statements without restriction or logging.

日志文本

No response

版本

v1.8.5

部署方式

Docker

是否还有其他可以辅助定位问题的信息?比如数据库版本等

No response

@hhyo
Copy link
Owner

hhyo commented Sep 19, 2022

fixed in 8cdb232 53ed326

@hhyo hhyo closed this as completed Sep 19, 2022
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