
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-40509 is a Cross-Site Request Forgery (CSRF) vulnerability in the DICOM viewer component of OpenEMR, an open-source electronic medical records platform. The flaw exists in /library/dicom_frame.php, where the web_path GET parameter is embedded unsanitized as a URL without validation, allowing an unauthenticated attacker to craft a malicious URL that forces an authenticated user to make unintended requests to arbitrary OpenEMR endpoints. All OpenEMR versions before 8.3.0 are affected. It was disclosed on August 19, 2026, with a patch released in OpenEMR 8.3.0 on August 18, 2026. The vulnerability carries a CVSS v3.1 base score of 4.3 (Medium) and a CVSS v4.0 base score of 5.3 (Medium) (Github Advisory, OpenEMR Advisory).
The root cause is CWE-352 (Cross-Site Request Forgery): the web_path parameter in library/dicom_frame.php is retrieved from $_REQUEST and only sanitized for quote characters via attr() before being embedded as a src attribute value in a Twig template (templates/dicom/dicom-viewer.html.twig). No CSRF token validation and no URL path restriction are applied when web_path is present, meaning any path — including internal OpenEMR endpoints — can be injected. The fix, applied in commit f760adc, adds a CsrfUtils::checkCsrfInput(INPUT_GET, dieOnFail: true) check that is triggered only when the web_path parameter is supplied, and updates callers to include a CSRF token in the constructed URL (OpenEMR Advisory, Fix Commit). The vulnerability also functions as an open redirect, enabling it to serve as a prerequisite for chained attacks against other OpenEMR endpoints (OpenEMR Advisory).
Successful exploitation allows an unauthenticated attacker to force an authenticated OpenEMR user with "Patients - Documents" permissions to make authenticated requests to arbitrary internal OpenEMR endpoints without their knowledge. Demonstrated impacts include forced session logout (via /interface/logout.php) and other state-changing actions performed in the victim's session context. While there is no direct confidentiality impact, the integrity of the OpenEMR session and application state can be compromised, and the vulnerability is noted as a prerequisite for chained attacks against additional endpoints (OpenEMR Advisory, Github Advisory).
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is approximately 0.128% (3rd percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported. The NVD SSVC assessment notes the attack is automatable with partial technical impact (Github Advisory).
/library/dicom_frame.php.web_path parameter. For example, to force logout: http://<target>/library/dicom_frame.php?web_path=/interface/logout.php?a=aweb_path value without CSRF validation, causing the victim's browser to make an authenticated request to the injected endpoint (e.g., logging the user out or performing another state-changing action).web_path to perform additional state-changing operations in the victim's session context (OpenEMR Advisory)./library/dicom_frame.php with a web_path parameter pointing to non-DICOM paths (e.g., /interface/logout.php, other internal endpoints) in web server access logs./library/dicom_frame.php?web_path=<internal_path> from user sessions, particularly where the referrer is an external or unexpected domain; sudden session terminations for users with Patients - Documents permissions.Upgrade OpenEMR to version 8.3.0 or later, which adds CSRF token validation to the web_path parameter in library/dicom_frame.php (OpenEMR Release, Fix Commit). As a temporary workaround prior to patching, restrict access to the DICOM viewer functionality and educate users with Patients - Documents permissions to avoid clicking links from untrusted sources. Network-level controls such as restricting external access to the OpenEMR interface can reduce exposure (Github Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."