/

CVE-2026-37711

Severity:

HIGH RISK

(7.3)

Code Injection in Dolibarr ERP/CRM

CVE-2026-37711

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dolibarr ERP/CRM versions 22.0.0 through 22.0.4 and 24.0.0-alpha contain a code injection vulnerability that can allow remote attackers to execute arbitrary code via the core/actions_addupdatedelete.inc.php script.

When attacker-controlled input is incorporated into dynamically evaluated PHP code or similar constructs, the application's runtime can be taken over under typical web-access conditions.

Affected context

The vulnerability resides in the Dolibarr ERP/CRM PHP application, specifically in the shared action handler file htdocs/core/actions_addupdatedelete.inc.php.

It is relevant in deployments where this script is accessible through standard web routes and where user-supplied parameters can reach code paths that construct or evaluate dynamic PHP expressions or commands.

The risk is higher in multi-user environments or internet-exposed instances where untrusted or semi-trusted users can interact with add/update/delete workflows.

Exploit preconditions

  • Attack surface: HTTP(S) endpoints in Dolibarr that route through core/actions_addupdatedelete.inc.php.
  • Required access: Ability to send crafted web requests to the affected Dolibarr instance (often authenticated, depending on configuration and exposed modules).
  • Trigger point: Invocation of add/update/delete actions that process user input and pass it into dynamically evaluated code paths within the script.
  • Why exploitation is possible: The script constructs or evaluates executable PHP logic using input that is insufficiently validated, sanitized, or constrained, allowing attacker-controlled data to alter what code is executed.

Why this happens

This issue is a classic CWE-94: Improper Control of Generation of Code ('Code Injection').

The core problem is that dynamically generated code (for example, PHP evaluated strings, dynamic function calls, or include/require paths) is influenced by request parameters without applying strict validation, whitelisting, or encoding.

Instead of treating user input as data only, the implementation allows it to shape the structure of executable logic, breaking the intended separation between code and data.

Once this boundary is crossed, an attacker can craft inputs that inject additional instructions or modify control flow, resulting in arbitrary code execution under the application's runtime user.

Potential impact

  • Remote execution of arbitrary PHP code within the Dolibarr application context
  • Full compromise of the underlying web application, including theft or tampering of ERP/CRM data
  • Installation of web shells or backdoors for persistent access
  • Pivoting to underlying server resources and connected systems, subject to OS-level permissions
  • Abuse of the application to exfiltrate sensitive business, financial, or customer information

General mitigation guidance

Effective mitigation focuses on preventing user data from ever being treated as executable code and on constraining dynamic behavior:

  • Refactor dynamic code generation patterns to use fixed code paths and parameterized logic instead of eval-like constructs or variable-function execution.
  • Apply strict whitelisting for any variable that influences function names, class names, methods, file paths, or configuration keys, rejecting unexpected values early.
  • Normalize all inputs at the boundary (type casting, enumeration checks, length and character constraints) before they reach core action handlers.
  • Enforce least-privilege execution for the web server and PHP runtime so that, if exploited, the attacker's capabilities on the host are minimized.
  • Centralize input-handling utilities with secure-by-default helpers that encode or escape values before use in dynamic contexts.

How teams detect issues like this

Detection typically combines automated analysis with targeted review of critical action handlers:

  • Use static analysis to flag use of dangerous PHP constructs (e.g., eval, dynamic include/require, variable functions, dynamic class instantiation) where inputs originate from $_GET, $_POST, or other request sources.
  • Implement secure coding guidelines that prohibit or tightly restrict runtime code generation and require explicit justification for any dynamic execution.
  • During code review, pay special attention to shared handler files like actions_addupdatedelete.inc.php that orchestrate create/update/delete operations, verifying strict parameter validation and whitelisting.
  • Integrate application security testing (SAST/DAST) into CI pipelines to detect anomalous behavior or tainted data flows leading to execution sinks.

Sources

SourceLink
bryamzxz.github.iobryamzxz.github.io/2026/05/25/dol_eval-five-years/
github.comgithub.com/Dolibarr/dolibarr/security/advisories/GHSA-grw9-6m4w-mhcq

Frequently asked

questions

Yes. The issue is reachable over HTTP(S) when an attacker can interact with Dolibarr endpoints that route through core/actions_addupdatedelete.inc.php, subject to any authentication or access controls configured.

It depends on how the affected actions are exposed in a given deployment. In many ERP/CRM setups, add/update/delete functionality is behind login, so an attacker may need at least low-privileged credentials. Misconfigurations or exposed modules could broaden unauthenticated reach.

Remove or replace dynamic code evaluation patterns, ensuring that user input is never used to build executable PHP code. Instead, rely on fixed control structures, strict whitelists for dynamic choices, and parameterized logic that treats all external data purely as values.

Establish coding standards that ban eval-style constructs, mandate centralized input validation, and require security review of any feature that uses dynamic dispatch or code generation. Combine these with automated static analysis and regular security testing integrated into the development lifecycle.

Find out what's already
exploitable in your codebase.