Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-110874 Overview
CVE-2026-110874 is a PHP object injection vulnerability in Dolibarr ERP/CRM versions before 23.0.4. The flaw resides in the jsonOrUnserialize() helper inside htdocs/core/lib/functions.lib.php. When json_decode() fails on an input string, the function falls back to unserialize() without restricting allowed classes. Authenticated attackers who can write to stored extrafields, export configurations, or blocked log entries can plant serialized PHP objects. These objects trigger gadget chains for arbitrary code execution or file manipulation [CWE-502].
Critical Impact
Authenticated attackers with write access to specific Dolibarr configuration surfaces can achieve PHP object injection leading to code execution and file manipulation on the host.
Affected Products
- Dolibarr ERP/CRM versions prior to 23.0.4
- Deployments exposing stored extrafields to authenticated users
- Instances allowing export configuration or blocked log entry writes
Discovery Timeline
- 2026-10-15 - CVE-2026-110874 published to NVD
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2026-110874
Vulnerability Analysis
The jsonOrUnserialize() helper exists to decode values that may be stored as either JSON or legacy PHP serialized strings. When json_decode() returns null, the function invokes unserialize() on the raw input. PHP's unserialize() instantiates arbitrary classes present in the application's autoload path. Dolibarr bundles numerous classes whose __destruct, __wakeup, or __toString magic methods perform file operations, SQL calls, or callback execution. Chaining these methods produces gadget chains that attackers can leverage for remote code execution or arbitrary file writes.
Root Cause
The root cause is the unrestricted call to unserialize() without passing the allowed_classes option. PHP defaults allowed_classes to true, which permits instantiation of any available class during deserialization. Any data path that reaches jsonOrUnserialize() with attacker-controlled bytes becomes a sink for PHP object injection.
Attack Vector
Exploitation requires an authenticated account with permission to write to one of the affected storage surfaces: stored extrafields, export configurations, or blocked log entries. The attacker stores a serialized PHP object string that will fail JSON decoding. When Dolibarr later reads and parses that value through jsonOrUnserialize(), the fallback unserialize() call instantiates the attacker's object graph and triggers the chosen gadget chain.
// Security patch in htdocs/core/lib/functions.lib.php
{
$result = json_decode($stringtodecode, $assoc);
if ($result === null) {
- $result = unserialize($stringtodecode); // For backward compatibility. Is no more used in recent versions.
+ $result = unserialize($stringtodecode, ['allowed_classes' => false]); // For backward compatibility. Is no more used in recent versions.
}
return $result;
}
// Source: https://github.com/Dolibarr/dolibarr/commit/17658fcaefdaabe13685e566e5f12d5fbd4f4a5c
The fix passes ['allowed_classes' => false] to unserialize(), forcing all deserialized objects to be instances of __PHP_Incomplete_Class and preventing gadget chain execution.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-110874
Indicators of Compromise
- Extrafield, export profile, or blocked log database rows containing values that begin with PHP serialized object markers such as O: or C: followed by a class name and length.
- PHP error logs referencing unexpected class instantiation, __wakeup, or __destruct warnings originating from functions.lib.php.
- Unexpected file writes, outbound connections, or shell processes spawned by the PHP-FPM or Apache worker running Dolibarr.
Detection Strategies
- Scan the llx_extrafields, export configuration, and blocked log tables for values matching PHP serialization patterns using regular expressions like ^O:\d+:".
- Enable PHP log_errors and alert on unserialize() warnings generated by htdocs/core/lib/functions.lib.php.
- Monitor web server access logs for authenticated POST requests to extrafield, export, or blocked log endpoints followed by anomalous backend behavior.
Monitoring Recommendations
- Track process lineage from the Dolibarr PHP worker and alert on child shells, scripting interpreters, or network utilities.
- Capture file integrity events on the Dolibarr document root and configuration directories.
- Correlate privileged user administrative actions with subsequent runtime anomalies on the host.
How to Mitigate CVE-2026-110874
Immediate Actions Required
- Upgrade Dolibarr to version 23.0.4 or later, which applies the allowed_classes => false fix to jsonOrUnserialize().
- Audit privileged user accounts and revoke write access to extrafields, export configurations, and blocked log entries where not required.
- Review existing stored data for serialized PHP object payloads and purge any suspicious entries.
Patch Information
The vendor fix is contained in Dolibarr Commit 17658fca and merged via Dolibarr Pull Request #38530. Technical context is documented in the VulnCheck Advisory for Dolibarr. Operators should pull release 23.0.4 or newer from the Dolibarr GitHub Repository.
Workarounds
- Restrict write permissions on extrafields, export configurations, and blocked log entries to a minimal set of trusted administrators until patching is complete.
- Apply the one-line fix in htdocs/core/lib/functions.lib.php manually by adding ['allowed_classes' => false] to the unserialize() call if an immediate upgrade is not feasible.
- Place the Dolibarr instance behind a web application firewall rule that blocks POST bodies containing PHP serialization markers in affected endpoints.
# Manually apply the upstream patch if upgrade is delayed
cd /path/to/dolibarr/htdocs/core/lib
sed -i "s|unserialize(\$stringtodecode);|unserialize(\$stringtodecode, ['allowed_classes' => false]);|" functions.lib.php
php -l functions.lib.php
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

