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-112361 Overview
CVE-2026-112361 is a protection mechanism failure [CWE-693] affecting Dolibarr ERP/CRM versions up to and including 23.0.2. The flaw resides in an unknown function within htdocs/document.php, part of the Content Security Policy (CSP) component. The weak CSP directive allows attackers to bypass intended browser-side restrictions on the download and image wrapper endpoints. An authenticated remote attacker can exploit the issue over the network with low privileges. Upgrading to Dolibarr 24.0.0 resolves the issue through commit 9f9ffa288d4ad2632c1d5dd88272c699a592f4ec.
Critical Impact
Weak CSP enforcement on Dolibarr document and image wrapper endpoints enables form-action abuse that can facilitate credential exfiltration or content redirection attacks.
Affected Products
- Dolibarr ERP/CRM versions up to 23.0.2
- Affected file: htdocs/document.php (CSP component)
- Affected file: htdocs/viewimage.php (CSP component, same patch)
Discovery Timeline
- 2026-10-19 - CVE-2026-112361 published to NVD
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-112361
Vulnerability Analysis
The vulnerability is a protection mechanism failure in Dolibarr's CSP configuration for the document.php and viewimage.php wrappers. These endpoints serve downloadable files and images, including resources accessible via shared hashp keys. The CSP header defined through the MAIN_SECURITY_FORCECSP constant previously permitted form actions to the same origin via form-action 'self'. This directive weakens the default-src 'none' baseline and lets injected or embedded content submit forms back to the Dolibarr origin. On endpoints that render user-controlled or shared content, this behavior can be chained with other weaknesses to exfiltrate data or facilitate phishing against authenticated users.
Root Cause
The root cause is an overly permissive CSP form-action directive on wrapper endpoints that serve document and image content. By allowing form-action 'self', the policy did not match the strict default-src 'none' posture appropriate for a download/view wrapper. The fix tightens the directive to form-action 'none', aligning the CSP with the intent that these endpoints should not host or process forms.
Attack Vector
Exploitation requires network access and low-privileged authentication to a vulnerable Dolibarr instance. An attacker leverages the weak CSP to perform form-action abuse against the document and image wrappers, which can be used to redirect submissions or support attacks on content loaded through the share-key workflow. The confidentiality, integrity, and availability impact is limited in scope but affects authenticated user interactions.
// Patch: htdocs/document.php (and htdocs/viewimage.php)
// Tightens CSP to disallow form submissions from the wrapper endpoints.
-define('MAIN_SECURITY_FORCECSP', "default-src 'none'; form-action 'self'; frame-ancestors 'self'");
+define('MAIN_SECURITY_FORCECSP', "default-src 'none'; form-action 'none'; frame-ancestors 'self'");
Source: GitHub Commit 9f9ffa288d
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-112361
Indicators of Compromise
- HTTP responses from /document.php or /viewimage.php containing the header value default-src 'none'; form-action 'self'; frame-ancestors 'self', indicating an unpatched instance.
- Unexpected form submissions originating from authenticated sessions targeting document.php or viewimage.php endpoints.
- Requests to document.php?hashp= or viewimage.php?hashp= from unfamiliar referrers or user agents.
Detection Strategies
- Inventory Dolibarr deployments and compare installed versions against 24.0.0 to identify instances still exposed to the weak CSP policy.
- Inspect outbound HTTP responses from Dolibarr web servers for the vulnerable MAIN_SECURITY_FORCECSP value using web proxy or WAF logging.
- Correlate authenticated web traffic with unusual POST requests to document and image wrapper endpoints.
Monitoring Recommendations
- Enable verbose access logging on the Dolibarr web server and forward logs to a centralized analytics platform for anomaly review.
- Alert on repeated access to hashp-based share URLs from distinct IP addresses within short time windows.
- Monitor browser-reported CSP violations if a report-to or report-uri directive is deployed in front of Dolibarr.
How to Mitigate CVE-2026-112361
Immediate Actions Required
- Upgrade Dolibarr to version 24.0.0 or later to apply the hardened CSP directive.
- If immediate upgrade is not feasible, apply the upstream patch 9f9ffa288d4ad2632c1d5dd88272c699a592f4ec to htdocs/document.php and htdocs/viewimage.php.
- Restrict access to Dolibarr instances to trusted networks or VPN until the patch is deployed.
Patch Information
The fix is included in Dolibarr 24.0.0, available in the GitHub Release 24.0.0. The specific change is tracked in the GitHub Commit 9f9ffa288d. Additional advisory details are available at VulDB CVE-2026-112361.
Workarounds
- Deploy a reverse proxy or WAF rule that rewrites the CSP response header for document.php and viewimage.php to use form-action 'none'.
- Disable public share-key workflows (hashp URLs) until the patched version is installed.
- Enforce strict session controls and reduce authenticated user privileges to limit the scope of CSP-related abuse.
# Example nginx snippet to override CSP for Dolibarr wrapper endpoints
location ~ ^/(document|viewimage)\.php$ {
proxy_pass http://dolibarr_backend;
proxy_hide_header Content-Security-Policy;
add_header Content-Security-Policy "default-src 'none'; form-action 'none'; frame-ancestors 'self'" always;
}
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

