Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Development Lib
>
Authority Management
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
209
Star
703
Fork
334
wangl1989
/
MSFM
Code
Issues
10
Pull Requests
1
Wiki
Insights
Pipelines
Service
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
MSFM backend table/list? Interface s_name has SQL injection
Backlog
#IBFVK9
rabbit
Opened this issue
2025-01-06 11:37
CVE-2024-57765 find by Chaitin Security Research Lab Vulnerability Product: wangl1989/MSFM Vulnerability version: before 2025.01.01 Vulnerability type: SQL injection Vulnerability Details: 1. Global search found that parameter concatenation through ${name} in the mapper/TableDao. xml: 47 path can cause SQL injection. This method is implemented in the listPage() method. Continue to find where this method is defined  2. Entering the TableDao layer, at com/mysiteforme/admin/dao/TableDao. java: 21, the path name parameter is placed in the map mapping and passed to the listPage() method. Continue to see where this method is called  3. Continuing the analysis, we come to com/mysiteforme/admin/service/ipl/TableServiceImpl. java: 198. The route listPage() method is called, and it can be seen from above that this operation is implemented in the selectTablePage() method  4. When we arrived at the controller control layer, we found that the selectTablePage() method was called on the admin/system/table route. Continuing to analyze, com/mysiteform/admin/controller/system/TableController. java: 70 can retrieve all parameters starting with s_ from the request and store them in a Map object. If the map is not empty, convert the parameters obtained by HTTP to string type and assign them to the parameter name. Further analysis shows that the passed parameters will directly enter the admin/system/table/list template file  5. When entering the template file templates/admin/system/table/list. ftl: 21, when the user inputs s_name, the form will directly pass the user's input value to the server after submission. The entire process does not filter or escape the parameter value of s_name. Therefore, we can trigger SQL injection vulnerabilities by controlling the s_name parameter  6. Construct POC, log in to the backend to capture packets, and replace cookies ``` POST /admin/system/table/list HTTP/1.1 Host: 127.0.0.1:8083 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Cookie: XXX X-Requested-With: XMLHttpRequest24 limit=10&page=1&s_name=1 ``` ``` python sqlmap.py -u "http://127.0.0.1:8083/admin/system/table/list" --data="limit=10&page=1&s_name=1" --cookie="XXXXX" -p s_name --current-db ``` 
CVE-2024-57765 find by Chaitin Security Research Lab Vulnerability Product: wangl1989/MSFM Vulnerability version: before 2025.01.01 Vulnerability type: SQL injection Vulnerability Details: 1. Global search found that parameter concatenation through ${name} in the mapper/TableDao. xml: 47 path can cause SQL injection. This method is implemented in the listPage() method. Continue to find where this method is defined  2. Entering the TableDao layer, at com/mysiteforme/admin/dao/TableDao. java: 21, the path name parameter is placed in the map mapping and passed to the listPage() method. Continue to see where this method is called  3. Continuing the analysis, we come to com/mysiteforme/admin/service/ipl/TableServiceImpl. java: 198. The route listPage() method is called, and it can be seen from above that this operation is implemented in the selectTablePage() method  4. When we arrived at the controller control layer, we found that the selectTablePage() method was called on the admin/system/table route. Continuing to analyze, com/mysiteform/admin/controller/system/TableController. java: 70 can retrieve all parameters starting with s_ from the request and store them in a Map object. If the map is not empty, convert the parameters obtained by HTTP to string type and assign them to the parameter name. Further analysis shows that the passed parameters will directly enter the admin/system/table/list template file  5. When entering the template file templates/admin/system/table/list. ftl: 21, when the user inputs s_name, the form will directly pass the user's input value to the server after submission. The entire process does not filter or escape the parameter value of s_name. Therefore, we can trigger SQL injection vulnerabilities by controlling the s_name parameter  6. Construct POC, log in to the backend to capture packets, and replace cookies ``` POST /admin/system/table/list HTTP/1.1 Host: 127.0.0.1:8083 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Cookie: XXX X-Requested-With: XMLHttpRequest24 limit=10&page=1&s_name=1 ``` ``` python sqlmap.py -u "http://127.0.0.1:8083/admin/system/table/list" --data="limit=10&page=1&s_name=1" --cookie="XXXXX" -p s_name --current-db ``` 
Comments (
0
)
Sign in
to comment
Status
Backlog
Backlog
Doing
Done
Closed
Assignees
Not set
Labels
Not set
Label settings
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(1)
Java
1
https://gitee.com/wanglingxiao/mysiteforme.git
git@gitee.com:wanglingxiao/mysiteforme.git
wanglingxiao
mysiteforme
MSFM
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register