/

CVE-2026-33913

Severity:

HIGH RISK

(7.7)

XML External Entity (XXE) / XInclude Injection

CVE-2026-33913

Analyzed

Vulnerability type

Category:

XML External Entity (XXE) / XInclude Injection

CWE:

CWE-611

Impact:

Arbitrary File Read / Information Disclosure

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenEMR's Carecoordination module improperly processes CCDA documents with XML XInclude directives, allowing authenticated users to reference local files on the server.

By uploading a crafted CCDA file containing XInclude elements, an attacker can cause the application to disclose arbitrary server-side files that are readable by the OpenEMR process.

Affected context

The vulnerability exists in OpenEMR deployments where:

  • The Carecoordination module is enabled and used to upload/import CCDA documents.
  • The XML parser handling CCDA input is configured with XInclude support (or equivalent external resource resolution).
  • Uploaded CCDA files are processed server-side without restricting or sanitizing XInclude directives.

Under these conditions, specially crafted CCDA uploads can cause the application to read local files from the server's filesystem.

Exploit preconditions

  • Attack surface: HTTP(S) interface exposing the Carecoordination CCDA upload functionality.
  • Required access: Valid, authenticated OpenEMR account with permission to access the Carecoordination module and upload CCDA documents.
  • Trigger point: Submission of a malicious CCDA file that includes an xi:include element with a file:// URL referencing a local path (for example, /etc/passwd).
  • Why exploitation is possible: The XML processing pipeline for CCDA documents allows XInclude resolution against local filesystem URIs without enforcing secure parsing options that disable external resource access, as described by CWE-611.

Why this happens

At its core, this is an XML External Entity / XInclude processing issue where untrusted XML content is parsed with features that allow loading external resources.

The CCDA parser in the Carecoordination module accepts user-supplied XML and resolves xi:include directives against the local filesystem.

Because the application does not disable or constrain XInclude/file URL handling, an attacker-controlled CCDA file can cause the server-side XML parser to open arbitrary files accessible to the OpenEMR process.

This matches CWE-611: Improper Restriction of XML External Entity Reference, extended here to include unsafe XInclude behavior.

Potential impact

  • Disclosure of sensitive configuration files (e.g., application configs, credentials, keys) that are readable by the OpenEMR service account.
  • Exposure of system-level information, such as /etc/passwd and other OS files, aiding in further attacks.
  • Leakage of other tenant or patient-related data stored in files on the same server, depending on file paths and permissions.
  • Facilitation of follow-on attacks such as privilege escalation, credential reuse, or lateral movement within the environment.

General mitigation guidance

Effective mitigation focuses on hardening XML parsing and strictly controlling how external resources are handled:

  • Configure XML parsers used for CCDA processing to disable XInclude, external entity resolution, and any file:// or network-based resource loading by default.
  • Use dedicated "secure XML" configurations or libraries that provide safe defaults for parsing untrusted healthcare data formats like CCDA.
  • Perform strict validation of CCDA documents against expected schemas, rejecting documents that contain unexpected namespaces or elements such as xi:include.
  • Isolate application components that must parse complex XML in processes or containers with minimal filesystem access and least privilege.
  • Limit filesystem exposure by ensuring the application account has only the permissions it requires and no access to sensitive system or credential files.

How teams detect issues like this

Detection typically involves examining both code and runtime behavior:

  • Static analysis/code review:
  • Look for XML parsers instantiated without secure settings (e.g., XInclude enabled, external entities allowed, unrestricted URI resolvers).
  • Flag usage patterns that enable XInclude or entity resolution on user-supplied XML (CCDA or other medical standards).
  • Review CCDA processing paths specifically for trust boundaries: any place where uploaded XML is parsed should be checked for secure parser configuration.
  • Dynamic and runtime monitoring:
  • Monitor application logs and system audit trails for unusual file access patterns originating from the OpenEMR process, particularly to configuration or system files during CCDA imports.
  • Inspect web server and application logs for repeated or anomalous CCDA uploads and error messages from XML parsing components.
  • Security testing:
  • Include XXE/XInclude test cases in application security testing for all XML-consuming endpoints, using automated tools or tailored scripts to verify that external resource loading is blocked.

Sources

SourceLink
github.comgithub.com/openemr/openemr/commit/67e1702c41cf486af0069bdafce19860e2cd9a11
github.comgithub.com/openemr/openemr/releases/tag/v8_0_0_3
github.comgithub.com/openemr/openemr/security/advisories/GHSA-9757-3cfj-wc8q

Frequently asked

questions

Yes, if the OpenEMR instance is exposed over the internet and an attacker can obtain valid credentials with access to the Carecoordination module. The attack is performed via HTTP(S) by uploading a malicious CCDA file.

Not necessarily. The attacker needs an authenticated account with permission to use the Carecoordination CCDA upload feature. They do not need operating system–level access, but their application role must allow CCDA imports.

The most robust fix is to ensure all XML parsers handling untrusted data are configured in a "secure mode" that disables XInclude, external entities, and external resource loading entirely. Complement this with schema validation and rejecting any unexpected XML constructs.

Adopt secure parser configuration as a default policy, encapsulating XML parsing behind hardened utility functions or services. During design and code review, treat all XML inputs as untrusted, require schema validation, and use automated checks or SAST rules to prevent reintroduction of XXE/XInclude capabilities in user-facing parsing paths.

Find out what's already
exploitable in your codebase.