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

sql注入 #11

Open
QiAnXinCodeSafe opened this issue Feb 18, 2019 · 1 comment
Open

sql注入 #11

QiAnXinCodeSafe opened this issue Feb 18, 2019 · 1 comment

Comments

@QiAnXinCodeSafe
Copy link

您好:
我是360代码卫士的工作人员,在我们的开源代码检测项目中发现Movie_Recommend存在sql注入漏洞。
详细信息如下:
在indexController.java文件的showtypesortmovie()中接受了请求中的sort参数并绑定到Selectquery对象中
default
最后调用了SortMoiveBycategory方法,跟进该方法对应的xml
default
由于mybatis中order by 后面的参数如果是用的#,排序将不起效果,所以开发人员用的$,但这样同时也导致了sql注入的存在。

复现:略
修复方法:在java层面上做映射,比如说用户只能输入1-5,然后在代码层面将其映射为字段名,然后再使用${}

@QiAnXinCodeSafe
Copy link
Author

QiAnXinCodeSafe commented Feb 18, 2019

反射型xss
在NavigationTag.java文件中的doStartTag()中接收了请求中的参数进行拼凑后直接输出在页面上,导致了反射型xss漏洞
default
line 46中调用了resolveUrl方法,接收请求中的参数并拼接在url上,最后在line 60输出在页面上。

不过在项目中并没有找到调用doStartTag()的地方

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

1 participant