CVE-2021-25955 Stored XSS in “Dolibarr” leads to privilege escalation

Critical 9.0 Published Updated

Stored XSS in Dolibarr allows low-privileged users to inject scripts that can steal admin session IDs, leading to account takeover and privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-25955?

CVE-2021-25955 is a critical cross-site scripting vulnerability in dolibarr, published on 15 Aug 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

In “Dolibarr ERP CRM”, WYSIWYG Editor module, v2.8.1 to v13.0.2 are affected by a stored XSS vulnerability that allows low privileged application users to store malicious scripts in the “Private Note” field at “/adherents/note.php?id=1” endpoint. These scripts are executed in a victim’s browser when they open the page containing the vulnerable field. In the worst case, the victim who inadvertently triggers the attack is a highly privileged administrator. The injected scripts can extract the Session ID, which can lead to full Account takeover of the admin and due to other vulnerability (Improper Access Control on Private notes) a low privileged user can update the private notes which could lead to privilege escalation.

Weakness: CWE-79

Which versions are affected by CVE-2021-25955?

2 open source packages ship an affected version, including dolibarr/dolibarr. It affects 1 product.

PackageAffectedFixed in
dolibarr/dolibarr PackagistFrom 2.8.114.0.0
dolibarr/dolibarr PackagistFrom 2.8.114.0.0

Products include Dolibarr Dolibarr.

How do I fix CVE-2021-25955?

Upgrade dolibarr/dolibarr to 14.0.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2021-25955 being exploited?

There is no known exploitation of CVE-2021-25955 in the wild and no public exploit code.

Sources

Also known as GHSA-cpv8-6xgr-rmf6, UBUNTU-CVE-2021-25955.

Is CVE-2021-25955 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free