CVE-2022-0731: Improper Authorization in dolibarr/dolibarr
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.16972%
CWE
Published
2/24/2022
Updated
1/28/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
dolibarr/dolibarr | composer | < 16.0 | 16.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the dol_check_secure_access_document function's handling of the 'userphoto' modulepart. Before patching, it granted unconditional access ($accessallowed = 1) to user photos without validating the file path structure. Attackers could bypass authorization by manipulating the file parameter to access arbitrary files in user directories. The patch added a regex check (preg_match('/^\d+/photos//') to enforce proper path structure, confirming the original vulnerability existed in this authorization check logic. Other file modifications were secondary path construction fixes that depended on this core authorization vulnerability.