79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Dolibarr WebDAV Unauthenticated RCE (CVE-2026-142691)

Dolibarr's public WebDAV directory lets an unauthenticated attacker move a PHP file outside it through encoded dot segments; no fixed release yet.

TL;DR

  • A path traversal in Dolibarr's WebDAV endpoint lets an unauthenticated attacker move a file from the public directory into a web-executable directory and run PHP. VulnCheck rates it CVSS v4.0 9.2 Critical.
  • Dolibarr 8.0.0 through 24.0.4 is affected when the WebDAV module is enabled and the generic public directory is turned on. Dolibarr says it is used by millions of users worldwide.
  • No in-the-wild exploitation is reported, no public proof of concept is published, and the CVE is not in CISA KEV as of 2026-12-03.
  • No fixed release is published yet. The fix is merged into the develop branch; "How do I fix it?" covers the patch and the setting that removes the unauthenticated route.

Am I affected?

All of these must hold:

  • The instance runs Dolibarr 8.0.0 through 24.0.4.
  • The WebDAV module is enabled.
  • The generic public directory is enabled, which sets DAV_ALLOW_PUBLIC_DIR.
  • An attacker can reach /dav/fileserver.php/public/ over HTTP or HTTPS.
  • The web server executes PHP from a directory the attacker can write to through the WebDAV move.

The public directory is off by default. It is an explicit option that gives anyone read and write access without a login. An instance without the WebDAV module, or with the public directory off, does not expose the unauthenticated route described by the CVE. The fix still matters for any DAV exposure, because it rejects dot segments in every request, not only anonymous ones.

Branch Affected versions Fixed version
Dolibarr ERP CRM 8.0.0 to 24.0.4 no fixed release; fix merged on the develop branch

Dolibarr 24.0.4, released on 2026-11-25, is the latest public release and is affected. The fix commit is on the develop branch, so it is not in a tagged release. The CVE record carries CVSS v4.0 9.2 Critical and CVSS v3.1 8.1 High.

Check the running version:

php -r "require 'htdocs/version.inc.php'; echo DOL_VERSION, PHP_EOL;"

Check the WebDAV module and the public-directory setting in the database. The table prefix is llx_ by default:

SELECT name, value, entity FROM llx_const
WHERE name IN ('MAIN_MODULE_DAV', 'DAV_ALLOW_PUBLIC_DIR');

A row for MAIN_MODULE_DAV with a non-empty value means the module is on. A row for DAV_ALLOW_PUBLIC_DIR with the value 1 means the public directory is on. Then check whether the endpoint answers without credentials:

curl -s -o /dev/null -w '%{http_code}\n' -X PROPFIND -H 'Depth: 0' https://erp.example.com/dav/fileserver.php/public/

A 401 means the server asked for authentication. A 207 or 200 means the public directory answered anonymously, which is the exposure to remove.

How do I fix it?

Apply the fix or remove the public directory. No fixed Dolibarr release is published as of 2026-12-03.

  1. If you maintain the source, apply commit c65014d or the two commits from pull request #43743 to htdocs/dav/fileserver.php, then test a WebDAV MOVE and COPY against the public directory. The commit is on the develop branch.
  2. Track the next Dolibarr release that carries the fix, then apply it.
  3. If you cannot patch now, open Home, Setup, Modules, WebDAV (admin/dav.php) and set "Enable the generic public directory" to No. That removes the unauthenticated route.
  4. If you do not use WebDAV at all, disable the DAV module in the module list.
  5. Restrict /dav/fileserver.php to trusted networks at the reverse proxy and block MOVE and COPY methods there.
  6. Make sure PHP is not executed from the Dolibarr documents directory. The public directory lives under the Dolibarr documents tree (documents/dav), and the move can reach directories outside the DAV roots.

The setting change is a workaround, not the fix. The patch decodes the request path and the Destination header before authorization, and rejects any dot segment in either. It also requires an anonymous MOVE or COPY that starts in the public directory to stay there. Those checks apply to every request, so they close the normalization gap for authenticated DAV paths too.

The fix is public in the Dolibarr pull request #43743 and in commit c65014db. Dolibarr credits Zulfaidhi Ikmal of Netbytesec for the report and Laurent Destailleur for the fix.

What is the root cause?

The WebDAV endpoint skips authentication for any request whose normalized path contains the public-directory prefix, and it never checks the Destination header that MOVE and COPY use. Sabre normalizes the path before the check but decodes percent-encoded dot segments later, when it resolves the path into the tree.

The endpoint builds the DAV tree from the public directory, the private directory and, optionally, the ECM directory:

if (getDolGlobalString('DAV_ALLOW_PUBLIC_DIR')) {
    $nodes[] = new \Sabre\DAV\FS\Directory($publicDir);
}
$nodes[] = new \Sabre\DAV\FS\Directory($privateDir);

Those lines are 198 to 202 of htdocs/dav/fileserver.php at tag 24.0.4. The authentication plugin is added only when the request does not look like a public-directory request:

if ((!getDolGlobalString('DAV_ALLOW_PUBLIC_DIR')
    || !preg_match('/'.preg_quote(DOL_URL_ROOT.'/dav/fileserver.php/public', '/').'/', Sabre\Uri\normalize($_SERVER["PHP_SELF"])))
    && !$browserAssetWithoutAuth
) {
    $server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend));
}

Those lines are 246 to 252. Sabre\Uri\normalize resolves literal . and .. segments, but it leaves percent-encoded %2e%2e segments in place. A request to /dav/fileserver.php/public/%2e%2e/%2e%2e/... therefore still matches the public prefix and skips authentication. Sabre decodes the path when it resolves the DAV tree, and the decoded .. segments walk out of the intended directory.

The MOVE and COPY handlers have a second gap. Their Destination header is not passed through the same normalization or authorization check, so an anonymous request can name a destination outside the public directory. The attacker uploads a file to the public directory with PUT. The attacker then asks the server to move or copy that file to a path with encoded dot segments that ends in a PHP file.

How is it exploited?

An unauthenticated attacker uploads a file to the public directory and then moves it into a directory the web server executes, using percent-encoded dot segments in the Destination header.

  1. Send a PUT request to /dav/fileserver.php/public/shell.php with the PHP payload as the body. The public directory accepts anonymous writes.
  2. Send a MOVE request for /dav/fileserver.php/public/shell.php.
  3. Set the Destination header to a path under the same endpoint that contains %2e%2e segments and ends in a web-executable directory.
  4. The endpoint sees the public prefix in the request path, skips the authentication plugin, and passes the request to Sabre.
  5. Sabre decodes the Destination path and resolves the dot segments outside the DAV root, so the file lands in the attacker-chosen directory.
  6. Request the moved file over HTTP. The web server executes the PHP payload.

The same sequence works with COPY. The public directory must allow anonymous writes, which is what the option is for, and the target directory must be writable by the web-server user. The advisory does not publish a proof-of-concept script, and the exploit path is described from the patch and the endpoint code.

How does the attack flow?

One anonymous upload and one MOVE with encoded dot segments place a PHP file outside the public directory.

flowchart LR A["Anonymous PUT to the public DAV directory"] --> B["PHP file stored in the DAV public directory"] B --> C["MOVE with encoded dot segments in Destination"] C --> D["Auth plugin skipped for the public prefix"] D --> E["Sabre decodes the path after normalization"] E --> F["File written outside the DAV root"] F --> G["Web server executes the PHP payload"]

Dolibarr 24.0.4 shipped six days before the fix and remains the latest release
Figure 1: From the latest affected release to the fix and the CVE record. Source: Dolibarr releases, the fix pull request and the CVE record, checked December 3, 2026

What can an attacker do?

An attacker who completes the chain runs PHP code as the web-server user. That is the same account that reads the Dolibarr configuration and connects to the database, so the impact is the full reach of the Dolibarr application and its data.

The conditions are the WebDAV module, the public directory, network reach to the endpoint and a writable, PHP-executable target directory. The attacker needs no account, no password and no interaction from a Dolibarr user.

The public directory is the anonymous entry point. Dolibarr describes it as a WebDAV directory that anybody can access in read and write mode without an authorization account. An instance that enables it is deliberately exposing anonymous file access, and this flaw turns that access into a path outside the directory.

The advisory does not demonstrate code execution with a public exploit, so the RCE claim rests on the source analysis and the destination path. A deployment that runs PHP only from the application's own entry points, with execution disabled in the documents tree and in uploaded-content directories, blocks the final step. That hardening is not a substitute for the patch.

Why does the fix work?

The fix decodes the request path and the Destination header before authorization and rejects any dot segment in either. It also confines an anonymous MOVE or COPY to the public directory.

+$decodedRequestPath = rawurldecode((string) parse_url((string) ($_SERVER['REQUEST_URI'] ?? ''), PHP_URL_PATH));
+$decodedDestinationPath = '';
+if (in_array($_SERVER['REQUEST_METHOD'], array('MOVE', 'COPY')) && !empty($_SERVER['HTTP_DESTINATION'])) {
+    $decodedDestinationPath = rawurldecode((string) parse_url((string) $_SERVER['HTTP_DESTINATION'], PHP_URL_PATH));
+}
+if (preg_match('#(?:^|/)\.(?:\.)?(?:/|$)#', $decodedRequestPath)
+    || ($decodedDestinationPath !== '' && preg_match('#(?:^|/)\.(?:\.)?(?:/|$)#', $decodedDestinationPath))
+) {
+    header('HTTP/1.1 403 DAV request not allowed');
+    exit(0);
+}

The diff is from commit efe4807f. Decoding first means a percent-encoded %2e%2e becomes .. before the check, so it can no longer hide from the path test. Rejecting dot segments in the Destination header closes the second gap.

The fix then computes whether the request is an anonymous request on the public directory and requires an anonymous MOVE or COPY to keep its destination inside that directory:

+$anonymousRequestOnPublicDir = (getDolGlobalString('DAV_ALLOW_PUBLIC_DIR')
+    && strpos($decodedRequestPath, $publicPathPrefix) === 0
+    && (dol_strlen($decodedRequestPath) == dol_strlen($publicPathPrefix) || $decodedRequestPath[dol_strlen($publicPathPrefix)] == '/'));
+if ($anonymousRequestOnPublicDir && $decodedDestinationPath !== ''
+    && !(strpos($decodedDestinationPath, $publicPathPrefix) === 0
+        && (dol_strlen($decodedDestinationPath) == dol_strlen($publicPathPrefix) || $decodedDestinationPath[dol_strlen($publicPathPrefix)] == '/'))
+) {
+    header('HTTP/1.1 403 DAV request not allowed');
+    exit(0);
+}

The fix is complete for the unauthenticated route in the CVE. It also rejects dot segments for authenticated requests, which covers the same normalization weakness on the private and ECM trees.

How do I check if I was compromised?

Start with the web-server access log. Look for PUT, MOVE and COPY requests to the DAV endpoint whose path or Destination header contains encoded dot segments.

grep -Ei '"(PUT|MOVE|COPY) [^"]*fileserver\.php[^"]*(%2e|%252e|\.\.)' /var/log/nginx/access.log

Nginx logs the request path but not the Destination header by default. If the endpoint is behind a proxy you control, log $http_destination for the DAV location and search it for %2e and ...

Then look for PHP files in the documents tree, where Dolibarr should not store executable code:

find /var/www/dolibarr/documents -type f -name '*.php'

A hit is a lead to inspect, not proof on its own. Compare it with the file modification time and the access-log entry for the move.

Finally, look for unexpected PHP files in the web root and compare them with the release manifest:

find /var/www/dolibarr/htdocs -type f -name '*.php' -newermt '2026-11-25'

An attacker who moved a file into the web root leaves a file that is not part of the Dolibarr package. An attempt that was blocked, or one that targeted a directory outside the web root, may leave no file and no log line beyond the request.

Timeline

  • 2026-11-25: Dolibarr released 24.0.4, the latest affected version.
  • 2026-12-01: Laurent Destailleur merged the fix in pull request #43743 on the develop branch, and the CVE record lists this as the public disclosure date.
  • 2026-12-03 00:09 UTC: The CVE-2026-142691 record was published.
  • 2026-12-03: No fixed release was published, no exploitation was reported, and the CISA KEV catalog version 2026.11.30 does not list the CVE.

FAQ

Is CVE-2026-142691 exploited in the wild?

No public report of exploitation existed as of 2026-12-03. The CVE is not in CISA KEV, and the CVE record does not mention attacks.

Do I need an account to exploit it?

No, when the public directory is enabled. The attacker uploads and moves the file through the anonymous public path. An instance with the public directory off does not expose that route.

Is there a fixed release?

No. As of 2026-12-03 the latest tag is 24.0.4, and the fix is on the develop branch. Track the next release and patch the file in the meantime.

Does disabling the public directory fix it?

It removes the unauthenticated route in the CVE, but it does not remove the dot-segment gap for authenticated DAV users. The patch rejects dot segments for every request, so apply it when a fixed release is available.

Is Dolibarr 24.0.4 affected?

Yes. 24.0.4 is inside the 8.0.0 to 24.0.4 range and predates the fix commit.

Can an attacker execute code if PHP is disabled in the documents directory?

The move can target any directory the web-server user can write to, including the web root. If PHP execution is disabled everywhere the attacker can write, the final step fails. That hardening reduces the impact but does not close the path traversal.

References

  • CVE-2026-142691 record: https://www.cve.org/CVERecord?id=CVE-2026-142691 (checked December 3, 2026)
  • GitHub advisory GHSA-fqx6-jq77-56f6: https://github.com/advisories/GHSA-fqx6-jq77-56f6 (checked December 3, 2026)
  • Dolibarr pull request #43743: https://github.com/Dolibarr/dolibarr/pull/43743 (checked December 3, 2026)
  • Dolibarr fix commit c65014db: https://github.com/Dolibarr/dolibarr/commit/c65014dbeb63a369acaac70347a116afc60ee825 (checked December 3, 2026)
  • Dolibarr fix commit efe4807f: https://github.com/Dolibarr/dolibarr/commit/efe4807f8277e21ed1812f3526a08785c57fbb52 (checked December 3, 2026)
  • Dolibarr 24.0.4 source, htdocs/dav/fileserver.php: https://github.com/Dolibarr/dolibarr/blob/24.0.4/htdocs/dav/fileserver.php (checked December 3, 2026)
  • Dolibarr releases: https://github.com/Dolibarr/dolibarr/releases (checked December 3, 2026)
  • Dolibarr project site: https://www.dolibarr.org/ (checked December 3, 2026)
  • CISA KEV catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked December 3, 2026)

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog