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

XSS vulnerability on latest version #4341

Closed
ghost opened this issue Jan 6, 2016 · 3 comments
Closed

XSS vulnerability on latest version #4341

ghost opened this issue Jan 6, 2016 · 3 comments
Assignees
Labels
Priority - High / Blocking This is a security hole or a bug that make a feature not possible to use or very expected feature. Security This is a bug identified as a security bug

Comments

@ghost
Copy link

ghost commented Jan 6, 2016

Hi all,

I don't think it's a good idea to post this here. But nobody respond to my mail and Dolibarr Official twitter account advise me to post this here (https://twitter.com/MickaelDorigny/status/684456187870457857) so ...

Here is an advisory about XSS Vulnerability on Dolibarr latest version (v3.8.3).

Vulnerability description :

A Stored XSS is available in the Dolibarr 3.8.3 core code. No module needs to be activated to exploit this XSS vulnerability because an attacker can use the user attributes management to do it.

This XSS can be exploited through a basic user account on the dolibarr installation. Impacted users are administrators and users that have right to check other user's attributes.

PoC n°1 : Stored XSS in user attributes:

Once a simple user is connected with his account, he can modifiy his attributes like Last name, First name, Mobile number, etc.. These informations can be reviewed by other users who have administration privileges.

Using the HTML tag and the "onmouseover" JavaScript event, we can force an admin to pass his mouse over the injected image. This event can be used to execute valid JavaScript instructions in the administrator browser or in browser of other users allowed to check user's attributes.

PoC :
As an authenticated user, fullfill "Last name", "First name", "email", "job" or "signature" input with this :
user1< img src=x onmouseover=alert(1) >

This is a PoC Video made by myself to expose the most dangerous usage of this vulnerability : https://www.youtube.com/watch?v=p2rFWJOCJC8

Feel free to ask more details if needed.

@rdoursenaud rdoursenaud added Priority - High / Blocking This is a security hole or a bug that make a feature not possible to use or very expected feature. Security This is a bug identified as a security bug version 3.8.3 labels Jan 8, 2016
rdoursenaud added a commit to GPCsolutions/dolibarr that referenced this issue Jan 8, 2016
… data by default

This should mitigate most HTML injections allowing XSS.
rdoursenaud added a commit to GPCsolutions/dolibarr that referenced this issue Jan 8, 2016
… data by default

This should mitigate most HTML injections allowing XSS.
@rdoursenaud rdoursenaud self-assigned this Jan 8, 2016
@eldy eldy closed this as completed in 36dc8b1 Jan 8, 2016
@fgeek
Copy link

fgeek commented Jan 24, 2016

When do you plan to release new version with these patches?

@ghost
Copy link
Author

ghost commented Jan 24, 2016

Hi,
I've seen your fix for this specific vulnerability. I have to alarm you that this fix is no sufficient. JavaScript is a very Powerful language and a good security fix will be to avoid JavaScript execution possibility, and not to avoid a specific payload.

If an attacker could not exploit this specific payload, He will exploit another one because JavaScript injection is still allowed (using other HTML tags, other JavaScript events).

I suggest you to read this very good paper about XSS protection :
https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet

For example, with your fix applied, JavaScript event "onmouseover" will not work, but "onmousemove", which is a similar one, will still work, so the vulnerability is still present.

@hregis
Copy link
Contributor

hregis commented Jan 24, 2016

@eldy @rdoursenaud
same problem with onmousemove, onmouseout, etc....

eldy added a commit that referenced this issue Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority - High / Blocking This is a security hole or a bug that make a feature not possible to use or very expected feature. Security This is a bug identified as a security bug
Projects
None yet
Development

No branches or pull requests

3 participants