DEV Community

SloaneWinterbourne
SloaneWinterbourne

Posted on

Dolibarr's public WebDAV directory can be used as a path into application code

Dolibarr's public WebDAV directory can be used as a path into application code

Dolibarr's DAV endpoint can expose a public directory for anonymous file exchange when DAV_ALLOW_PUBLIC_DIR is enabled. CVE-2026-142691 shows that the public boundary was enforced incompletely. An unauthenticated user could upload a file there, then use a MOVE or COPY request with encoded dot segments to place it outside the permitted directory.

The vulnerability affects Dolibarr ERP CRM versions 8.0.0 through 24.0.4. The fix changes htdocs/dav/fileserver.php so the request path and Destination header are decoded and checked before Sabre resolves them.

How the path escapes

The DAV authentication plugin was skipped for requests whose URL contained the public directory path. The Destination header used by MOVE and COPY was not checked at the same trust boundary. Percent-encoded dot segments were decoded after Sabre normalized the URL, so a path that looked contained during authorization could resolve somewhere else during the operation.

The required condition is enabled anonymous access to the public DAV directory. An attacker can upload a file through that route, then request a move or copy to a location writable by the web server. If the destination is within the web root and the server executes the uploaded type, the path traversal can become remote code execution.

The public directory therefore provides an unauthenticated write primitive. Its safety depends on canonical path checks, destination confinement and file execution policy.

Remediation

Apply the vendor fixes for CVE-2026-142691 or upgrade to a release containing the corrected DAV code. If anonymous DAV access is not required, set DAV_ALLOW_PUBLIC_DIR to false and remove the public directory. Restrict write permissions for the web server and disable execution in upload directories.

Search the DAV access logs for unauthenticated PROPFIND, PUT, MOVE and COPY requests, especially encoded . or .. segments and destinations outside the public directory. Check the web root for unexpected files and compare their hashes with deployed application artifacts. Preserve file timestamps and request identifiers before cleanup.

Detection limits

The vulnerability does not require a valid Dolibarr session, so failed-login dashboards may reveal nothing. Web-server access logs and file-system changes are more useful. Encoded paths may be decoded by a proxy before they reach the audit sink, so inspect both the raw request target and the normalized path.

Batch integrity checks help identify planted files, but a path traversal can also overwrite configuration or a template without adding a new filename. Compare the application tree with the package manifest and source-control output. A successful write does not prove execution. Look for child processes, outbound connections and new web requests to the planted path.

References

Top comments (0)