/

CVE-2026-55471

Severity:

CRITICAL RISK

(9.1)

XXE (CWE-611) in HAPI FHIR Saxon XSLT XML Transform

CVE-2026-55471

Analyzed

Vulnerability type

Category:

XML External Entity (XXE)

CWE:

CWE-611

Impact:

Local File Disclosure and SSRF via XXE

Severity:

CRITICAL RISK

(9.1)

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

A Saxon-based XML transformation utility in HAPI FHIR instantiates a TransformerFactory without restricting external DTD or stylesheet access, enabling XML External Entity (XXE) injection.

When an attacker can control or tamper with XML passed into these transforms, they can attempt local file disclosure and blind XXE or SSRF to internal or external URLs reachable from the host.

Affected context

This vulnerability occurs in HAPI FHIR deployments that rely on org.hl7.fhir.utilities.XsltUtilities.saxonTransform(...) overloads using Saxon for XML/XSLT processing.

It is relevant when application flows accept XML that can be influenced, crafted, or intercepted by an adversary and then pass that XML into the vulnerable transformation logic.

Configurations where external entities or network access are permitted to the runtime environment are more exposed, though effective damage depends on filesystem layout, service reachability, and the privileges of the HAPI FHIR process.

Exploit preconditions

  • Attack surface: XML inputs passed to XsltUtilities.saxonTransform(...) (including XSLT or XML documents used by that utility).
  • Required access: Ability to supply or modify XML being transformed, such as via API endpoints, integration interfaces, or configuration-driven transformation pipelines.
  • Trigger point: Execution of the Saxon-based XSLT transformation that parses attacker-influenced XML containing external entity references or external stylesheet URLs.
  • Why exploitation is possible: The code instantiates net.sf.saxon.TransformerFactoryImpl without setting ACCESS_EXTERNAL_DTD or ACCESS_EXTERNAL_STYLESHEET restrictions, so the XML processor can resolve external entities and remote resources controlled by the attacker.

Why this happens

The core bug lies in unsafe XML processing configuration: the transformation logic creates a generic Saxon TransformerFactoryImpl instance without explicitly disabling external entity resolution and external resource access.

This maps to CWE-611: Improper Restriction of XML External Entity Reference, where XML parsers or transformers are left with defaults that allow external DTDs, entities, or stylesheets to be fetched and processed.

Conceptually, the pattern is trusting XML input as purely data while using a library that treats XML as instructions capable of initiating file reads or network calls, leading to data exfiltration and server-side interactions beyond the intended scope.

Potential impact

  • Local file disclosure from the host filesystem via crafted external entities.
  • Blind XXE attacks that infer data or behavior based on parser error messages or timing.
  • Server-Side Request Forgery (SSRF) to internal services and metadata endpoints accessible from the HAPI FHIR host.
  • Interaction with external URLs that may facilitate secondary attacks or data exfiltration.
  • Expanded attack surface for chaining with other vulnerabilities (e.g., internal admin interfaces, cloud metadata, or privileged services).

General mitigation guidance

Effective mitigation focuses on hardening XML processing configuration and reducing trust in XML supplied by external or semi-trusted sources.

Typical defensive patterns include:

  • Configuring XML and XSLT processors to disable external entity resolution and external stylesheet loading by default.
  • Applying explicit restrictions via secure processor properties (e.g., limiting or denying ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_STYLESHEET to trusted locations only).
  • Treating XML and XSLT inputs as untrusted unless they originate from controlled, authenticated, and integrity-protected sources.
  • Segregating transformation logic from sensitive filesystem areas and high-value internal services, combined with least-privilege execution for the HAPI FHIR process.
  • Incorporating secure configuration templates so that new XML processing utilities inherit locked-down defaults without requiring per-call overrides.

How teams detect issues like this

Organizations can identify similar XXE risks with a mix of automated and manual techniques:

  • Static analysis or custom rules that flag XML parsers and transformers instantiated without secure properties or with external access enabled.
  • Code review checklists that require verification of entity expansion settings and external resource restrictions for all XML/XSLT utilities.
  • Centralized configuration policies ensuring XML processing libraries are wrapped by secure factory methods rather than directly instantiated.
  • Runtime monitoring or testing using benign XXE/SSRF probes in staging environments to confirm that external entities and remote URLs are blocked rather than resolved.

Sources

SourceLink
github.comgithub.com/hapifhir/org.hl7.fhir.core/commit/01ca2ecdefec9b33204d2495fe78af8c0dc52298
github.comgithub.com/hapifhir/org.hl7.fhir.core/releases/tag/6.9.10
github.comgithub.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-2f55-g35j-5jmf

Frequently asked

questions

Yes, if remote users can send or influence XML that is ultimately passed into the vulnerable transformation routines. Remote reachability depends on how HAPI FHIR is integrated and exposed.

An attacker needs the ability to control or tamper with XML documents or stylesheets processed by XsltUtilities.saxonTransform(...), which may be possible through API requests, integration endpoints, or manipulated configuration inputs.

The safest pattern is to instantiate XML and XSLT processors through hardened factory methods that always disable external entity resolution and restrict or deny external resource access, coupled with a default-deny stance for untrusted XML.

Standardize secure XML processing configurations across the codebase, enforce them via shared utilities, incorporate checks in code review and CI pipelines, and treat any new XML/XSLT handling as security-sensitive functionality requiring explicit restrictions on external entities and resources.

Find out what's already
exploitable in your codebase.