Impact
An improper validation of redirect URIs in Medplum’s external identity provider callback allows an attacker to specify an arbitrary redirect destination that only needs to share a registered prefix. After a successful external IdP login, the server appends Medplum login and authorization code values to the supplied redirect URL and performs the redirection. Because the state information, which contains the redirect URI, is serialized as raw JSON and later trusted by the callback, an attacker who can modify state.redirectUri can cause the server to send authorization artifacts to a malicious endpoint. If the registered redirect URI is a bare origin or a prefix that can be extended into a different hostname, the leakage becomes cross‑origin, exposing authorization codes that can be exchanged for access tokens or granted account privileges.
Affected Systems
Medplum developer platform, all releases prior to v5.1.6. The vulnerability is present in versions before the 5.1.6 release in which the issue was patched.
Risk and Exploitability
The CVSS score of 7.1 reflects a high severity and availability of exploitation is likely through a web‑based attack. The EPSS score is not provided, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector is inferred to be client‑side web requests to the external authentication callback, exploiting the lack of strict URI validation. An attacker can perform unauthorized token theft by redirecting the authorization code to a controlled server. This can lead to compromise of user accounts and associated data.
OpenCVE Enrichment
Github GHSA