/

CVE-2026-124466

Severity:

HIGH RISK

(7.2)

Server-Side Request Forgery (CWE-918) in OpenEMR OAuth2

CVE-2026-124466

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthenticated server-side request forgery and access to internal network resources

Severity:

HIGH RISK

(7.2)

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

OpenEMR before 8.4.0 has a server-side request forgery (SSRF) vulnerability in its OAuth2 client handling. An unauthenticated attacker may cause the server to fetch attacker-controlled JWKS locations, potentially probing internal services or reaching cloud metadata endpoints.

Affected context

The issue occurs in OpenEMR's OAuth2 flow when a client can be registered with a jwks_uri that is not adequately validated. A request to the token introspection endpoint can trigger a server-side fetch when an unsigned client_assertion is supplied. Deployments may be at risk when these endpoints are reachable by unauthenticated users and outbound requests can access sensitive internal destinations.

Exploit preconditions

  • Attack surface: OpenEMR OAuth2 client registration and token introspection endpoints
  • Required access: The described attack does not require authentication if client registration is available to unauthenticated users
  • Trigger point: Introspection processing of an unsigned client_assertion for a client with an unvalidated jwks_uri
  • Why exploitation is possible: The server fetches a client-supplied URI without sufficiently restricting the destination

Why this happens

The root cause is insufficient validation and restriction of a URI used for a server-side network request. When an application trusts a client-controlled jwks_uri and fetches it during OAuth2 processing, an attacker may influence where the server connects. This behavior maps to CWE-918: Server-Side Request Forgery (SSRF).

Potential impact

  • An attacker may probe internal services from the OpenEMR server's network position.
  • The server could reach cloud metadata endpoints if network controls permit it.
  • Sensitive information exposed by reachable internal services may be at risk.
  • Outbound requests could be used to map accessible network resources.

General mitigation guidance

Defensive patterns focus on ensuring client-controlled URLs cannot direct requests to sensitive destinations.

  • Validate and normalize JWKS URLs against an explicit, trusted destination policy.
  • Prefer secure-by-default designs that accept keys or trusted references without fetching arbitrary client-provided URLs.
  • Restrict outbound network access from the application, including access to internal and cloud metadata addresses.
  • Apply least privilege to the application runtime and keep OAuth2 registration and introspection behavior within clearly defined trust boundaries.

How teams detect issues like this

Review OAuth2 client registration and introspection code for server-side fetches of client-supplied URLs, particularly JWKS URI handling. Static analysis and code review can flag HTTP clients that receive untrusted URL values without destination validation. Monitor application logs and outbound network telemetry for unusual requests to loopback, private, link-local, or metadata-service addresses. Network policies can also enforce allowlists for destinations the application is permitted to contact.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-mf6h-xc62-9fg4
vulncheck.comvulncheck.com/advisories/openemr-before-8.4.0-unauthenticated-ssrf-via-oauth2-client-jwks-uri

Frequently asked

questions

The described flow can be triggered through OAuth2 endpoints. If client registration and introspection are reachable as described, an attacker may exploit it without authentication.

No authenticated access is described as necessary. The relevant condition is that the attacker can register a client and trigger the introspection flow.

Avoid fetching arbitrary client-supplied URLs. Where fetching is necessary, validate destinations against a strict policy and block access to sensitive network ranges.

Treat URLs from clients as untrusted, restrict application egress with network controls, and review outbound-request code for SSRF risks.

Find out what's already
exploitable in your codebase.