CVE-2019-17223
Description
There is HTML Injection in the Note field in Dolibarr ERP/CRM 10.0.2 via user/note.php.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The AI Insight narrative is available to signed-in members. Sign in or create a free account to read it.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
dolibarr/dolibarrPackagist | < 11.0.1 | 11.0.1 |
Affected products
2- Dolibarr/Dolibarr ERP/CRMdescription
Patches
Discovered fix commits and diffs is available to signed-in members. Sign in or create a free account to read it.
Vulnerability mechanics
Root cause
"Missing input sanitization in the Note field allows stored HTML injection and Cross-site Scripting (XSS)."
Attack vector
An attacker with permission to edit notes (e.g., a user with `user->user->creer` rights) can inject arbitrary HTML into the Note field via `user/note.php` [ref_id=2]. The injected payload is stored in the database and rendered without proper sanitization when any user views the note, resulting in stored Cross-site Scripting (XSS) [CWE-79]. The attacker can craft HTML containing `position: absolute !important` or `position: fixed !important` CSS to overlay malicious content over the page, or inject script tags and event handlers to steal session cookies or perform actions on behalf of the victim.
Affected code
The vulnerability is in the Note field handling across multiple files. The core sanitization function `dol_string_onlythesehtmltags()` in `htdocs/core/lib/functions.lib.php` allowed dangerous HTML tags and did not strip `position: absolute/fixed !important` CSS. The display template `htdocs/core/tpl/notes.tpl.php` and the user note page `htdocs/user/note.php` output user-supplied note content without passing it through `dol_string_onlythesehtmltags()`. The form helper `htdocs/core/class/html.form.class.php` also lacked sanitization when rendering note values.
What the fix does
The patch [patch_id=1700700] applies multiple layers of defense. In `dol_string_onlythesehtmltags()`, a new parameter `$cleanalsosomestyles` strips `position: absolute !important` and `position: fixed !important` CSS directives that could be used for UI overlay attacks. The function also now properly wraps the allowed-tags string with angle brackets. In `html.form.class.php`, note output is now passed through `dol_string_onlythesehtmltags(dol_htmlentitiesbr(...))` instead of raw `dol_escape_htmltag()`, allowing safe HTML formatting while stripping dangerous tags. The template files (`notes.tpl.php`, `user/note.php`, `group/card.php`, etc.) now apply the same sanitization function and add the CSS class `sensiblehtmlcontent`, which forces all child elements to `position: static !important` to neutralize overlay-based attacks.
Preconditions
- authAttacker must have a Dolibarr account with permission to edit notes (e.g., user creation rights)
- configThe application must be Dolibarr version 10.0.2 or earlier (before 11.0.1)
- networkAttacker must have network access to the Dolibarr web interface
Generated on May 23, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/advisories/GHSA-3264-65pg-5xm4ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-17223ghsaADVISORY
- github.com/Dolibarr/dolibarr/commit/c7736dde41826ac6eca3e838e57eab2f0304e256ghsaWEB
- medium.com/%40k43p/cve-2019-17223-stored-html-injection-dolibarr-crm-erp-ad1e064d0ca5mitrex_refsource_MISC
- medium.com/@k43p/cve-2019-17223-stored-html-injection-dolibarr-crm-erp-ad1e064d0ca5ghsaWEB
- security.snyk.io/vuln/SNYK-PHP-DOLIBARRDOLIBARR-473217ghsaWEB
- www.dolibarr.org/forum/dolibarr-changelogsmitrex_refsource_MISC
News mentions
0No linked articles in our index yet.