ZeroHour

CVE-2026-53728

niche

Open redirect in Medplum external IdP callback leaks authorization codes (CVE-2026-53728)

CVSS 3.1
7.1 high
EPSS
<1%p4
Published
()
Modified
AI analysis

Medplum versions before 5.1.6 validate the redirect URI in the external identity provider callback at GET /auth/external using prefix matching rather than exact matching, and the external login state is serialized as raw JSON and later trusted by the callback. An attacker who can introduce a crafted state value with their own redirectUri into the external sign-in flow (for example via a crafted external login link, consistent with the user-interaction requirement in the CVSS vector) can, after the victim completes a successful external IdP login, make the server append the Medplum login and code values to the attacker-supplied URL and redirect the victim there. When the registered client redirect URI is a bare origin or another prefix that can be extended into a different hostname, this leaks the login value and authorization code cross-origin to an attacker-controlled endpoint, enabling code theft. Only Medplum deployments running versions prior to 5.1.6 that use external identity provider sign-in are affected; instances not using external IdP login are not exposed to this flaw. No public proof-of-concept or confirmed exploitation is known, and EPSS currently estimates about a 0.1% probability of exploitation within 30 days.

What to do: Upgrade Medplum to version 5.1.6 or later, which addresses the redirect URI validation flaw. Deployments using external identity provider login that cannot upgrade immediately should review whether their registered client redirect URIs are bare origins or extendable prefixes (the condition that turns this into a cross-origin code leak), and monitor logs for GET /auth/external redirects carrying login/code parameters to unexpected hosts. Also watch for updates to exploit intelligence, as exploitation status is currently based on an absence of known PoCs rather than positive confirmation.

Affected
Medplumall versions prior to 5.1.6 (fixed in 5.1.6)
Estimated exposure
niche~hundreds to low thousands of deployments (niche open-source healthcare developer platform; only deployments using external IdP sign-in are affected) — Estimated from Medplum's deployment pattern as a niche open-source healthcare FHIR developer platform typically run as self-hosted or hosted instances by healthcare development teams; the data contains no install or user counts, and the…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Medplum is a developer platform that enables development of healthcare apps. Prior to version 5.1.6, the external identity provider callback at GET /auth/external accepts attacker-controlled redirect URIs that only need to start with a registered client redirect URI, rather than matching exactly. After a successful external IdP login, the server appends Medplum login and code values to that attacker-supplied URL and issues a redirect. Because the external login request state is serialized as raw JSON and later trusted by the callback, an attacker who can tamper with state.redirectUri can cause Medplum to redirect authorization artifacts to an attacker-controlled endpoint. When the registered redirect URI is a bare origin or another prefix that can be extended into a different hostname, this becomes a cross-origin authorization code leak. This issue has been patched in version 5.1.6.

Weakness
CWE-345, CWE-601
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L

In the news

No ingested article mentions this CVE yet.