Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Fix for Self XSS vuln in dolibarr #9

Merged
merged 2 commits into from
Aug 10, 2020
Merged

Fix for Self XSS vuln in dolibarr #9

merged 2 commits into from
Aug 10, 2020

Conversation

spooky360
Copy link

@spooky360 spooky360 commented Aug 5, 2020

📊 Metadata *

Please enter the direct URL for this bounty on huntr.dev. This is compulsory and will help us process your bounty submission quicker.

Bounty URL: https://www.huntr.dev/bounties/2-packagist-dolibarr

⚙️ Description *

A lack of escaping exists in the dol_print_error (in htdocs/core/lib/functions.lib.php file).
This could lead to XSS.

💻 Technical Description *

The fix simply html-entity encodes the var before printing it.

🐛 Proof of Concept (PoC) *

  1. Log into your dolibarr instance
  2. Change your browser user-agent by appending something like <script>alert(document.domain);</script>
  3. Modify the URL in order to throw an error (for example: http://dolibarr/document.php?modulepart=.&attachment=0&file=dddd&&entity=10&&entity=1000&&entity=101&mainmenu=home)
  4. No more XSS, the payload string is displayed instead of being executed

🔥 Proof of Fix (PoF) *

pof

👍 User Acceptance Testing (UAT)

Copy link

@mufeedvh mufeedvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! 👏🎉

LGTM

Copy link

@Mik317 Mik317 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😄 🎉

Cheers,
Mik

Copy link

@toufik-airane toufik-airane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huntr

@JamieSlome JamieSlome merged commit 7359c95 into 418sec:develop Aug 10, 2020
@huntr-helper
Copy link
Member

Congratulations spooky360 - your fix has been selected! 🎉

Thanks for being part of the community & helping secure the world's open source code.
If you have any questions, please respond in the comments section. Your bounty is on its way - keep hunting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants