All vulnerabilities

Servers and applications

CVE-2026-34036

Authenticated Local File Inclusion (LFI) via selectobject.php leading to sensitive data disclosure

Severity
Medium 6.5
Published
25 Mar 2026
Last changed
7 Oct 2026
Added to UpHeron
1 Nov 2026
Exploit chance
1.5% in the next 30 daysHigher than 74% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
PHP file inclusion (CWE-98)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Also known as
GHSA-2mfj-r695-5h9r
Sources
NVD, Project advisories (GitHub)

Description

Dolibarr Core (Tested on version 22.0.4)

I have discovered a Local File Inclusion (LFI) vulnerability in the core AJAX endpoint /core/ajax/selectobject.php. By manipulating the objectdesc parameter and exploiting a fail-open logic flaw in the core access control function restrictedArea(), an authenticated user with no specific privileges can read the contents of arbitrary non-PHP files on the server (such as .env, .htaccess, configuration backups, or logs…).

The vulnerability is caused by a critical design flaw in /core/ajax/selectobject.php where dynamic file inclusion occurs before any access control checks are performed, combined with a fail-open logic in the core ACL function.

  • Arbitrary File Inclusion BEFORE Authorization: The endpoint parses the objectdesc parameter into a $classpath. If fetchObjectByElement fails (e.g., by providing a fake class like A:conf/.htaccess:0), the application falls back to dol_include_once($classpath) at line 71.
From Dolibarr/dolibarr's security advisory. Shortened; the full text is there.

Workarounds

  • Input Validation & Whitelisting: The $classpath must be strictly validated or whitelisted before being passed to dol_include_once().
  • Execution Flow Correction: The file inclusion logic must never be executed before the user's authorization has been fully verified.
  • Enforce Fail-Secure ACLs: Modify restrictedArea() in core/lib/security.lib.php so that if the $features parameter is empty, access is explicitly denied ($readok = 0) instead of allowed by default
Workarounds as given by Dolibarr/dolibarr's security advisory.

Affected software

SoftwareAffected versions
Dolibarr ERP CRMServers and applications · cpe:a:dolibarr:dolibarr_erp\/crm
  • Every version up to 22.0.4
Dolibarr ERP CRMServers and applications · github:dolibarr/dolibarr
  • Every version up to 22.0.4

About Dolibarr ERP CRM

Open Source ERP & CRM for Business

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
6Packagist, 15 Nov 2026
Total downloads (Packagist)
5,256Packagist, 15 Nov 2026
Docker Hub pulls
1,398,358Docker Hub, 15 Nov 2026
GitHub stars
7,873GitHub, 15 Nov 2026
Forks
3,622GitHub, 15 Nov 2026
Latest release
24.0.3GitHub, 15 Nov 2026
Released
11 Nov 2026GitHub
Developer
DolibarrWikidata
License
GPL-3.0GitHub
Written in
PHP, SQLWikidata
First released
2002Wikidata
First published on GitHub
26 Jun 2011GitHub

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2026-34036
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-34036
  • GitHub Advisory Database https://github.com/advisories/GHSA-2mfj-r695-5h9r
  • github.com https://github.com/Dolibarr/dolibarr/security/advisories/GHSA-2mfj-r695-5h9r