Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. dolibarr/dolibarr
  4. ›
  5. GHSA-49xw-hw94-fmv2

GHSA-49xw-hw94-fmv2: Dolibarr has Remote Code Execution Vulnerability (Bypass)

July 21, 2025 (updated December 18, 2025)

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

Click to open external image

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

Click to open external image

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:

Click to open external image

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.

References

  • github.com/Dolibarr/dolibarr
  • github.com/Dolibarr/dolibarr/blob/21.0.2/htdocs/admin/menus/edit.php
  • github.com/Dolibarr/dolibarr/blob/21.0.2/htdocs/user/document.php
  • github.com/Dolibarr/dolibarr/security/advisories/GHSA-49xw-hw94-fmv2
  • github.com/advisories/GHSA-49xw-hw94-fmv2

Code Behaviors & Features

Detect and mitigate GHSA-49xw-hw94-fmv2 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 21.0.2

Solution

Unfortunately, there is no solution available yet.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')

Source file

packagist/dolibarr/dolibarr/GHSA-49xw-hw94-fmv2.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 18 May 2026 00:18:51 +0000.