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

Validate/escape db fields to avoid XSS attack #566

Closed
batopa opened this issue Jan 8, 2015 · 3 comments
Closed

Validate/escape db fields to avoid XSS attack #566

batopa opened this issue Jan 8, 2015 · 3 comments

Comments

@batopa
Copy link
Member

batopa commented Jan 8, 2015

To avoid XSS attack we need validating and/or escaping untrusted fields to/from database.

More details here (thanks to Steffen Rösemann)

Registered users, who are allowed to use the administrative backend (as translator or editor for example) are able to use arbitrary HTML and/or JavaScript-code which gets stored in the database backend without being sanitized. This has an effect on other registered users on the administrative backend, as the code is executed when visiting the sites prepared by an attacker.
The vulnerabilities are found in the following URLs on a normal BEdita installation:

http://{TARGET}/index.php/home/profile (in form with id „editProfile“ via input field with id „lrealname")
http://{TARGET}/index.php/ (inform with id „addQuickItem“ via input field with name "data[title]" and name "data[description]")
http://{TARGET}/index.php/areas (in form with id „saveNote“ via input field with id „notetext")
http://{TARGET}/index.php/documents/view (in form with id „updateForm“ via input field with id „titleBEObject“ and input field with id „tagsArea“)

If you, for example, write a simple <script>alert(document.cookie)</script> in the above mentioned input fields and save it, it will get executed, when visiting the prepared site. That can be a security issue, if for example a translator-user with not as much administrative rights as the administrator is abusing the vulnerabilities and tricks the administrator to visit the sites.
I found out, that injecting code in the input field with id „tagsArea“ gets as well executed on the frontend, when guest users are visiting the page.

@batopa batopa self-assigned this Jan 8, 2015
@batopa batopa added this to the 3-stable milestone Jan 8, 2015
batopa added a commit that referenced this issue Jan 8, 2015
batopa added a commit that referenced this issue Jan 9, 2015
batopa added a commit that referenced this issue Jan 9, 2015
batopa added a commit that referenced this issue Jan 9, 2015
@ghost
Copy link

ghost commented Jan 11, 2015

This issue has been assigned CVE-ID CVE-2015-1040. See http://seclists.org/oss-sec/2015/q1/115. Greetings!

batopa added a commit that referenced this issue Jan 16, 2015
batopa added a commit that referenced this issue Jan 16, 2015
@batopa
Copy link
Member Author

batopa commented Jan 16, 2015

The issues reported and many others are fixed on 3-corylus branch. The patch will be soon available in the next release.

@stefanorosanelli
Copy link
Member

did some testing, everything seems ok now
closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants