Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as patient or core user
-
DeliveryObtain CSRF token from portal
-
ExploitPOST crafted HTML to doc_lib.php content param
-
ExecutionmPDF resolves local file via CSS import or php://filter SVG
-
PersistExfiltrate server file to attacker or PDF
-
ImpactRead credentials and OAuth keys
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Requires an authenticated session - a patient-portal account or a core/staff account - plus a valid CSRF token obtained from /portal/patient/onsitedocuments, then a POST to /portal/lib/doc_lib.php with attacker-controlled HTML in the 'content' parameter (handler=fetch_pdf or handler=download). Exploitation works against default configurations because HTML-to-PDF document generation is a standard OpenEMR feature and HTMLPurifier does not neutralize the restored <style> block passed to mPDF. Limiting factors: authentication is mandatory (PR:L, not unauthenticated); the SVG/php://filter variant (Variant B) additionally needs a glibc/GNU-iconv PHP deployment and an attacker-reachable HTTP(S) host serving the crafted SVG, and the vendor notes the default musl-based openemr:8.4.1 Alpine image lacks the iconv encodings needed to build the arbitrary-byte JPEG carrier; the CSS-import variant (Variant A) is more broadly applicable. |
| Impact | This is a credible but bounded priority: a real file-disclosure flaw gated behind authentication, not a drive-by remote compromise. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H) and score 7.1 are internally consistent with the description - network-reachable, low complexity, but requiring low-privilege authentication (PR:L: any patient-portal or core user). Impact is confidentiality-only (VC:H, VI:N/VA:N): arbitrary server-file read including credentials and OAuth keys, with no integrity or availability effect, and the advisory explicitly rules out RCE because OpenEMR mandates PHP >= 8.3 while the mPDF RCE path needs PHP < 8. The vuln.today decision label is 'this_week' (not act_now/emergency), aligning with an authenticated-but-serious issue. No CISA KEV status and no EPSS score are provided in the input, so widespread or automated exploitation cannot be asserted - treat exploitation likelihood as unquantified rather than high. A detailed proof-of-concept is published in the vendor GHSA advisory, which raises practical risk above a theoretical bug, but the SVG/php://filter variant is explicitly deployment-specific (works on glibc/GNU-iconv, fails on the default musl Alpine image), so reliable exploitation is not universal. Net: a genuine data-exposure risk worth prompt patching, not a high-CVSS-but-low-real-risk item, yet the authentication requirement and disclosure-only impact keep it below emergency tier. |
| Exploit ScenarioDerived | An attacker who holds or registers a patient-portal account (or any core/staff account) authenticates, obtains a CSRF token from the Clinical Documents page, and POSTs crafted HTML to /portal/lib/doc_lib.php with a malicious CSS @import or nested-SVG php://filter reference. mPDF resolves the local path during PDF generation and either exfiltrates the targeted file (e.g. /etc/passwd, credentials, OAuth keys) to an attacker callback server or embeds its bytes in the returned PDF. A working proof-of-concept for both variants is published in the vendor GHSA advisory, though the SVG variant requires a glibc/GNU-iconv target. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
OpenEMR releases before 8.5.0 hand user-supplied HTML from the portal's document-generation endpoint directly to the mPDF renderer, letting an authenticated patient-portal or core/staff account force the server to resolve local files, imported CSS and resources nested inside SVG images. By posting crafted CSS @import rules or a php://filter-bearing SVG reference to /portal/lib/doc_lib.php, an attacker can exfiltrate arbitrary server-readable files, including credentials and OAuth keys, with high confidentiality impact but no integrity or availability effect. The flaw is authenticated (CVSS v3.1 PR:L) and requires a valid CSRF token, is not recorded in CISA KEV, and the vendor advisory publishes detailed validated proof-of-concept reproduction steps; a fixed release exists in 8.5.0.
RemediationAI
Upgrade OpenEMR to 8.5.0 or later, the version named in the GHSA-h4xc-pqg3-8459 advisory and the VulnCheck advisory, which also record the fix as available from the vendor. There is no configuration change that fully neutralizes the flaw: HTMLPurifier sanitization is already applied by default and the disclosure survives it because the <style> block is restored after purification, so patching is the complete fix. If the upgrade cannot be applied immediately, reduce exposure by restricting who can reach the document-generation path - limiting the patient portal or the /portal/lib/doc_lib.php endpoint to trusted staff sessions, or temporarily disabling portal PDF document generation - accepting the loss of a standard clinical-documents feature for portal users. Note that egress filtering on the PHP host blunts Variant A's callback-based exfiltration but not Variant B's in-band embedding of file bytes in the returned PDF, and that the musl-based Alpine deployment only removes the php://filter carrier construction, not the CSS variant, so neither measure substitutes for upgrading. Advisory URLs: https://github.com/openemr/openemr/security/advisories/GHSA-h4xc-pqg3-8459 and https://www.vulncheck.com/advisories/openemr-before-8.5.0-local-file-disclosure-via-doc-lib-php-pdf-renderer.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause class is CWE-73 (external control of file name or path) in OpenEMR's PDF pipeline. src/Pdf/PatientPortalPDFDocumentCreator.php pulls the contents of a user-supplied <style> block out with a regular expression before running HTMLPurifier, purifies only the remaining markup (with data, http and https URIs allowed), and then splices the original, unpurified stylesheet back into the document before calling mPDF's writeHtml(). Because mPDF is permitted to resolve local files, remote URLs, imported CSS and resources nested inside SVG images, the restored CSS escapes the sanitizer's guarantees entirely; mPDF's own documentation warns that HTML passed to it must be sanitized and that HTMLPurifier alone is not sufficient. Two disclosure primitives are demonstrated. Variant A chains CSS @import fragments so that a generated background-image URL carries the contents of a local file to an attacker-controlled callback host. Variant B feeds a remote SVG whose nested xlink:href begins with ':/php://filter/' - a prefix that bypasses mPDF's leading php:// rejection while still reaching the PHP stream wrapper - and uses an environment-specific iconv/base64 filter chain to prepend a minimal JPEG header so mPDF embeds the transformed file bytes into the returned PDF. The advisory notes mPDF's historical remote-code-execution paths are not reachable here because OpenEMR requires PHP 8.3.0 or later, so the practical outcome is local file disclosure only. The SVG variant depends on glibc/GNU-iconv encodings and an attacker-reachable HTTP(S) SVG host; the official musl-based openemr:8.4.1 Alpine image reproduced nested reads of existing local images but could not build the arbitrary-byte carrier.
Know when Openemr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Network-reachable endpoint, low complexity, but any low-privilege patient or core account is required (PR:L); arbitrary file read gives C:H with no integrity or availability impact and no scope change.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
OpenEMR before 8.5.0 passes authenticated user-controlled HTML from the doc_lib.php content parameter to mPDF, which resolves local files and nested SVG resources. Authenticated patients or core users can submit crafted CSS imports or php://filter SVG references to read arbitrary server files including credentials and OAuth keys.
Technical POC Analysis
CWE-73 (External Control of File Name or Path).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
OpenEMR versions before 8.5.0 contain a high-severity vulnerability that allows authenticated users to access sensitive server files, potentially exposing credentials and OAuth keys. This affects both patient-portal and staff accounts, so leadership should prioritize remediation to prevent unauthorized data access and protect patient trust.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
An authenticated SQL injection vulnerability exists in OpenEMR ≤ 4.1.1 Patch 14 that allows a low-privileged attacker to
Unauthenticated token disclosure in OpenEMR before 8.0.0. CVSS 10.0. PoC and patch available.
Path traversal in OpenEMR 7.0.4 disposeDocument() allows file access. PoC available.
Path traversal in OpenEMR electronic health records before fix allows authenticated users to read arbitrary files on the
SQL injection in OpenEMR electronic health records before fix. Authenticated users can execute arbitrary SQL through the
OpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.cl
An issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid par
Information disclosure in OpenEMR 5.0.2 to before 8.0.0 exposes sensitive data. PoC and patch available.
Remote code execution in OpenEMR through 8.2.0 lets an authenticated administrator poison the document category tree so
interface/fax/fax_dispatch.php in OpenEMR 4.1.0 allows remote authenticated users to execute arbitrary commands via shel
Authenticated low-privilege users can exploit OpenEMR before 8.3.0 to read and write arbitrary files through the fax/sms
interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication
EUVD-2026-125014
GHSA-3w96-q735-fgm7
NVD
CVE.org
EPSS
Exploit-DB