Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege Patient Portal user
-
DeliveryFetch CSRF token from portal UI
-
ExploitPOST crafted img/style url() to doc_lib.php
-
ExecutionmPDF fetches internal/metadata URL over HTTP GET
-
ImpactProbe internal ports and reflect image responses
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires (1) an authenticated Patient Portal session as the lowest-privilege patient - no elevated role needed; (2) the Patient Portal enabled (portal_onsite_two_enable = 1); and (3) a valid CSRF token fetched from the portal UI, submitted alongside handler=fetch_pdf and cpid to POST /portal/lib/doc_lib.php with the attacker payload in the 'content' parameter. Exploitation is gated to HTMLPurifier/mPDF PDF generation where URI.DisableExternal/DisableExternalResources are left false and attribute-less <style> content is reinserted after purification. Limiting factors that reduce realistic impact: only HTTP/HTTPS and the GET method are reachable (file://, gopher://, dict:// fail), so AWS IMDSv2 (which needs a PUT-returned token) is NOT exploitable; non-image responses such as JSON metadata are not embedded in the PDF, so credentials cannot be read back directly (only endpoint reachability is observable); V1 background-image fetches are fully blind; and in a typical deployment the SSRF does not directly reach PHI. |
| Impact | This is a medium-severity, authenticated SSRF (CVSS 4.0 base 5.3; vendor-suggested CVSS 3.1 5.0). The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) confirms network reach, low complexity, and - via PR:L - that an authenticated low-privilege Patient Portal (patient) account is required; UI:N means no victim interaction. No EPSS score and no KEV status were provided, and the vulnerability is not listed as CISA KEV, so there is no confirmed active exploitation. A detailed public PoC reference exists in the GHSA advisory (GHSA-wc8m-q5xj-j34x) with full reproduction output for all three variants, but the input does not flag it as a verified working exploit package. The real-world risk is moderate rather than urgent: the vuln.today decision label is 'this_month' (not act_now/emergency), impact is capped at blind-to-limited SSRF (internal port probing, metadata-endpoint reachability, and limited 1x1-image reflection), and the advisory honestly scopes out the worst case - only HTTP/HTTPS GET is reachable, so AWS IMDSv2 (PUT-token) is NOT exploitable and JSON credential bodies are not reflected back. The gating factor pulling risk down is the required authenticated patient account on a Portal-enabled instance; the factor pulling it up is that even the lowest-privilege patient can reach cloud metadata/internal services, which in a misconfigured cloud deployment could expose IMDSv1 credentials. Net: a legitimate patch-this-cycle item, not a drop-everything emergency. |
| Exploit ScenarioDerived | An attacker registers or compromises a low-privilege Patient Portal account on an internet-facing OpenEMR instance (Portal enabled), obtains a CSRF token from the portal UI, and POSTs HTML containing an attacker-controlled img src, inline style url(), or attribute-less <style> block to /portal/lib/doc_lib.php. The server's mPDF PDF generator then issues outbound HTTP GET requests to attacker-chosen internal addresses or cloud metadata endpoints (e.g. 169.254.169.254), letting the attacker map internal services and, when a valid image is returned (V2/V3), embed response bytes in the generated PDF. A public PoC reference with working reproduction exists in the GHSA advisory; given AV:N/AC:L the request is simple and scriptable once authenticated. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
OpenEMR before 8.5.0 lets an authenticated Patient Portal user (the lowest-privilege patient role) coerce the server into issuing outbound HTTP GET requests to arbitrary hosts by abusing the PDF-generation path used for portal documents. Payloads placed in the 'content' parameter of portal/lib/doc_lib.php survive sanitization because PatientPortalPDFDocumentCreator::createPdfObject() allows http/https URIs without loading HTMLPurifier's external-resource filters and reinserts the raw contents of attribute-less <style> blocks after purification, after which mPDF fetches the attacker-supplied URLs. Impact is bounded to blind SSRF and internal endpoint reachability - only HTTP/HTTPS GET is possible, non-image responses are not reflected, and AWS IMDSv2 cannot be reached - and the vendor has released a fix in 8.5.0; detailed reproduction steps and payloads are published in the GitHub security advisory, and there is no CISA KEV entry indicating active exploitation. Exploitation additionally requires the Patient Portal to be enabled and a valid CSRF token from the portal UI.
RemediationAI
Upgrade to OpenEMR 8.5.0, the vendor-released fixed version; this is the only complete fix, and the upstream advisory at https://github.com/openemr/openemr/security/advisories/GHSA-wc8m-q5xj-j34x documents it alongside the reproduction cases. If an immediate upgrade is not possible, apply the advisory's code-level fix in src/Pdf/PatientPortalPDFDocumentCreator.php so that user-supplied HTML cannot cause remote fetches: enable HTMLPurifier's URI.DisableExternal and URI.DisableExternalResources (the sibling OnsiteDocumentController already restricts URI.AllowedSchemes to data only) and remove the post-purification reinsertion of raw <style> block content - trade-off: legitimate remote images and custom styling in portal-generated PDFs will stop rendering, so validate document templates after the change. Restricting server egress so the OpenEMR host cannot reach link-local metadata addresses such as 169.254.169.254 reduces the metadata-endpoint exposure, with the trade-off that any legitimate outbound integrations from that host must be allow-listed; this does not address internal port probing of 127.0.0.1 and other reachable internal hosts. Disabling the Patient Portal (portal_onsite_two_enable = 0) removes the attack path entirely but eliminates patient-facing portal functionality.
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 flaw is CWE-918 (Server-Side Request Forgery) in the Patient Portal document-to-PDF pipeline. portal/lib/doc_lib.php takes $_POST['content'] unfiltered and hands it to PatientPortalPDFDocumentCreator::createPdfObject(), which sanitizes HTML with HTMLPurifier before rendering with mPDF (verified against mPDF 8.3.1 and HTMLPurifier 4.19.0). Two configuration defects in src/Pdf/PatientPortalPDFDocumentCreator.php defeat the sanitizer: URI.AllowedSchemes is explicitly set to data/http/https while URI.DisableExternal and URI.DisableExternalResources remain at their default false, so external-resource filters never enter the URI filter chain; and a pre-purification preg_match captures raw <style> content that is spliced back into the document after purification, fully bypassing HTMLPurifier's CSS filtering. Three delivery variants were verified: V1 attribute-less <style> reinsertion with background-image: url() or @import url() (blind - CSS is not extractable from the PDF), V2 <img src> external URLs, and V3 inline style attributes using background/background-image url(). At render time mPDF follows ImageProcessor::getImage() into AssetFetcher::fetchRemoteContent() and CurlHttpClient::sendRequest(), and Config_Mpdf::getConfigMpdf() imposes no remote-fetch restrictions. Reachability is constrained: only HTTP/HTTPS and only GET, so file://, gopher:// and dict:// produce no requests and IMDSv2 (which needs a PUT-returned token) is not exploitable; V2/V3 reflect fetched image bytes into the returned PDF (verified with a 1x1 PNG), giving a PDF-size side channel for port probing, while JSON metadata is not embedded. The advisory notes the sibling OnsiteDocumentController already restricts URI.AllowedSchemes to data only, indicating the risk pattern is understood elsewhere in the codebase. The CPE cpe:2.3:a:openemr:openemr:*:*:*:*:*:*:*:* covers all pre-8.5.0 releases.
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:N/VI:L/VA:N/SC:L/SI:L/SA:L
Authenticated low-privilege patient (PR:L), simple remote request (AV:N/AC:L), scope change as the server reaches other systems (S:C), and only limited info exposure (C:L, no integrity/availability impact demonstrated).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
OpenEMR before 8.5.0 contains a server-side request forgery vulnerability in PatientPortalPDFDocumentCreator::createPdfObject() that allows authenticated patients to make the server issue HTTP GET requests. Attackers can submit img src, inline style url(), or reinserted unpurified style blocks via the content parameter of portal/lib/doc_lib.php to probe internal ports and cloud metadata endpoints.
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
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
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-124960
GHSA-gvxx-27r9-p46h
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB