/

CVE-2026-49120

Severity:

HIGH RISK

(8.5)

Server-Side Request Forgery (CWE-918) in Medplum FHIR Subscription Worker

CVE-2026-49120

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized Internal Network Access and Data Exfiltration

Severity:

HIGH RISK

(8.5)

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

Medplum versions before 5.1.14 contain a server-side request forgery (SSRF) vulnerability in the subscription worker, where authenticated users can register FHIR Subscription endpoints with arbitrary URLs.

By pointing these endpoints at internal services, attackers can coerce the Medplum server to perform unauthorized internal network requests and exfiltrate IAM credentials and sensitive patient health data.

Affected context

This vulnerability arises in Medplum deployments that use FHIR Subscription resources to trigger outbound HTTP requests from a backend worker process.

When a user can create or modify Subscription resources with custom endpoint URLs, and the server resolves and calls those URLs without strict network egress controls or validation, internal network locations become reachable through the application.

This typically affects environments where the Medplum subscription worker has connectivity to internal services such as cloud metadata endpoints, internal databases, or orchestration APIs that are not directly exposed to the public internet.

Exploit preconditions

  • Attack surface: Medplum FHIR API for creating or updating Subscription resources.
  • Required access: Authenticated user account with permission to create or manage FHIR Subscription resources.
  • Trigger point: The subscription worker sending HTTP POST requests to the configured endpoint URL whenever matching FHIR events occur.
  • Why exploitation is possible: The worker trusts user-controlled endpoint URLs and issues outbound HTTP requests from a privileged internal network position without enforcing strict allowlists, network segmentation, or outbound URL validation.

Why this happens

The core issue is a server-side request forgery pattern, where untrusted user input (the Subscription endpoint URL) is used directly to construct and dispatch HTTP requests from the server environment.

Instead of constraining callbacks to a vetted set of domains or network ranges, the implementation allows arbitrary URLs, effectively turning the subscription worker into a proxy for reaching internal-only services.

This behavior maps to CWE-918: Server-Side Request Forgery (SSRF), in which an attacker leverages server-side HTTP capabilities and network visibility to interact with resources that are otherwise inaccessible from the external network perimeter.

Potential impact

  • Access to cloud instance metadata services, which could expose temporary IAM credentials or tokens.
  • Unauthorized access to internal APIs, databases, or administration endpoints reachable from the subscription worker.
  • Exfiltration of sensitive patient health records through crafted subscription endpoints and POST bodies.
  • Abuse of internal orchestration or control plane endpoints, potentially enabling lateral movement or privilege escalation within the environment.
  • Use of the Medplum server as a pivot point to map internal network topology and services.

General mitigation guidance

Effective mitigation focuses on strictly limiting where server-side callbacks can be sent and reducing the trust placed in user-controlled URLs:

  • Enforce allowlists of permitted domains or network ranges for Subscription endpoints, rejecting or sanitizing any URL outside controlled destinations.
  • Implement URL validation that blocks access to link-local, loopback, private, and metadata IP ranges, as well as non-HTTP/HTTPS schemes.
  • Place subscription workers in network segments with minimal necessary egress capabilities, avoiding direct connectivity to sensitive control-plane or metadata endpoints.
  • Apply least-privilege principles to any credentials accessible from the worker, so that even if SSRF occurs, exposed tokens have limited scope.
  • Prefer architectural patterns where external systems poll for data using well-defined APIs, instead of unbounded, user-defined push endpoints.

How teams detect issues like this

Detection can combine code-level analysis with operational monitoring:

  • Use static analysis and code review to flag any use of HTTP client libraries with user-controlled URLs, especially in background workers or callback mechanisms.
  • Review FHIR Subscription handling logic for missing domain allowlists, inadequate URL validation, or direct use of user input in outbound network calls.
  • Monitor outbound network traffic from subscription workers for connections to unexpected internal IP ranges, metadata services, or non-standard destinations.
  • Implement logging and alerting on Subscription creation and update events that specify unusual or internal-looking endpoints (e.g., IP literals, link-local ranges).
  • Integrate automated security testing or SSRF-focused scanners in CI/CD pipelines to exercise callback endpoints with controlled test inputs.

Sources

SourceLink
github.comgithub.com/medplum/medplum/commit/87595e98d756d840d70d9dc87beb9d4f9e158b59
github.comgithub.com/medplum/medplum/pull/9334
github.comgithub.com/medplum/medplum/releases/tag/v5.1.14
vulncheck.comvulncheck.com/advisories/medplum-ssrf-via-fhir-subscription-endpoint

Frequently asked

questions

It is exploitable by remote authenticated users who can create or modify FHIR Subscription resources. The attacker does not need direct network access to internal services; they leverage the Medplum server to reach those services on their behalf.

The attacker must have a Medplum account with permissions to define or update Subscription endpoints. They do not need administrative privileges if standard users can create subscriptions that accept arbitrary URLs.

The safest pattern is to strictly constrain outbound callback targets: enforce domain allowlists, block internal and metadata IP ranges, and centralize URL validation so that no user-controlled input can cause the server to contact arbitrary destinations.

Apply a defense-in-depth approach: treat all user-influenced URLs as untrusted, validate and restrict them at the application layer, enforce egress controls at the network layer, and regularly review code paths that perform server-initiated HTTP requests for potential SSRF behavior.

Find out what's already
exploitable in your codebase.