HL7's FHIR specification says directly that it is not a security protocol: it defines data models and exchange patterns, and recommends pairing them with OAuth 2.0, SMART App Launch, OpenID Connect and TLS — but implementing and correctly enforcing those controls, especially per-record authorization, is left entirely to whoever builds the API. That gap is not theoretical: a 2021 test of production FHIR APIs found broken object-level authorization — one patient's session reaching another patient's records — in the majority of systems tested, despite OAuth already running in front of them. Two federal rules now turn FHIR API security from best practice into a hard 2026–2027 compliance deadline for anyone serving U.S. healthcare data.
Key takeaways
- It secures nothing by itself.
- SMART App Launch is HL7's implementation guide for wiring OAuth 2.0 to FHIR; the current published release is 2.2.0 (STU 2.2), and it is the concrete standard both CMS and ONC point to.
- Scopes set the ceiling of what a client may ask for; they never grant more than the user or client policy behind them.
- They tag data with policy; they do not enforce it.
What does FHIR actually secure, and what does it leave to implementers?
It secures nothing by itself. FHIR (Fast Healthcare Interoperability Resources), HL7's standard for exchanging healthcare data through RESTful APIs, says on its Security page that it "is not a security protocol, nor does it define any security related functionality"; it defines "exchange protocols and content models that need to be used with various security protocols defined elsewhere." What the spec does provide is a set of recommendations: OAuth 2.0 for authorizing client access, OpenID Connect for authenticating end users, TLS per IETF BCP 195 for every production exchange, and AuditEvent and Provenance resources for recording security-relevant events (IHE's Basic Audit Log Patterns guide profiles AuditEvent for that purpose). But a recommendation is not an enforcement mechanism, and the spec says so directly: "It is the responsibility of implementers to ensure that relevant regulations and other requirements are met." A server can conform fully to FHIR's resource models while implementing none of this — conformance testing checks what the data looks like on the wire, not whether the wire is locked down.
What does SMART App Launch require, and who actually needs which flow?
SMART App Launch is HL7's implementation guide for wiring OAuth 2.0 to FHIR; the current published release is 2.2.0 (STU 2.2), and it is the concrete standard both CMS and ONC point to. It splits into two patterns depending on who's connecting:
| SMART App Launch (user-facing) | SMART Backend Services (headless) | |
|---|---|---|
| Use case | Patient or clinician-facing app, launched standalone or from inside an EHR session | Automated system-to-system integration with no human present |
| Flow | OAuth 2.0 authorization-code grant, with user consent | OAuth 2.0 client-credentials grant |
| Client authentication | Confidential clients authenticate; public clients (e.g. mobile apps with no secure secret storage) may not | JWT assertion (RFC 7523), SMART's preferred method "because it avoids sending a shared secret over the wire" |
| PKCE | Required: servers "SHALL support the S256 code_challenge_method and SHALL NOT support the plain method" | Not applicable — no browser redirect involved |
| Discovery | .well-known/smart-configuration relative to the FHIR server's base URL, in both cases |
Same |
The asymmetric client authentication profile is strict on details that matter for a device cloud. The client registers a public JSON Web Key Set, and "SHALL support both RS384 and ES384" signatures. Each authentication JWT names the client as iss and sub, the token URL as aud, carries an exp that "SHALL be no more than five minutes in the future", and a unique jti; the server rejects a jti it has already seen within that window, which blocks replay. For Backend Services, access tokens "SHALL be short-lived", with expires_in that "SHOULD NOT exceed 300" seconds.
How do SMART v2 scopes limit what an app can do?
Scopes set the ceiling of what a client may ask for; they never grant more than the user or client policy behind them. SMART v2 scopes have three parts: a context (patient/, user/ or system/), a FHIR resource type or *, and permissions drawn in order from .cruds — create, read, update, delete, search.
| Scope | Meaning |
|---|---|
patient/Observation.rs |
Read and search Observations for the patient in context |
patient/Observation.rs?category=…laboratory |
Same, limited to laboratory results (v2 search-parameter constraint) |
user/*.cruds |
Full access, but only "relative to the user's underlying permissions" |
system/Observation.c |
A backend client may create Observations, within its pre-configured server policy |
launch/patient |
Ask the server to establish a patient in context |
openid fhirUser |
Return an id_token identifying the current user |
v1 scopes still appear: SMART maps .read to .rs and .* to .cruds, and servers advertise permission-v1 when they accept them. Two warnings in the scopes page are worth reading twice. A wildcard such as patient/*.cruds covers data the server "may be enhanced to expose in the future", so consent screens should say so. And "neither SMART on FHIR nor the FHIR Core specification provide a way to model the 'underlying' permissions at play" — a granted scope may still produce a 403, or a search with records silently omitted. That underlying permission check is server code, and it is exactly what the research below found missing.
What do FHIR security labels do, and what can't they do?
They tag data with policy; they do not enforce it. Every FHIR resource has a meta.security element that can carry a confidentiality code (from Unrestricted and Normal up to Restricted and Very Restricted), a sensitivity category, a purpose of use and handling caveats. The Security Labels page describes an access control decision engine that uses the labels to approve operations and filter results, and says the recipient is "obligated to enforce the handling caveats." It also says labels "are most effective in fully trusted environments" where partners have agreed to honour them; elsewhere "they might not all be recognized and enforced." A device maker should treat a label as input to its own authorization logic, never as a control that a receiving system will apply.
Why did independent research call FHIR APIs healthcare's "last mile" risk?
Because "OAuth is running" and "patient data is actually protected" turned out to be different claims when someone tested real systems. Alissa Knight's "Playing with FHIR" research, presented at DEF CON 29's Biohacking Village in 2021 and published by sponsor Approov, found vulnerabilities in 60% of the FHIR APIs tested. The headline finding was Broken Object Level Authorization (BOLA): a caller authenticated with one patient's valid credentials could reach other patients' records, because the server verified who was calling without verifying which records that caller was entitled to retrieve. BOLA is item 1 in the OWASP API Security Top 10 2023 (see our OWASP API Security Top 10 guide). On the mobile side, 53% of the tested apps had hard-coded API keys or tokens, and none used certificate pinning; the OWASP MASTG covers both tests. HL7 attributed the vulnerabilities to "the implementation of apps and by third-party FHIR aggregators," not the FHIR standard — which lines up with what FHIR's own security page says about scope.
What do CMS and ONC now require, and by when?
They require named versions of the same standards, on fixed dates. The binding text is in 45 CFR 170.215 and 170.315(g)(10) on eCFR, and in the CMS rule published in the Federal Register.
| Requirement | Source | Date |
|---|---|---|
| SMART App Launch 2.0.0, with Token Introspection; SMART 1.0.0 adoption "expires on January 1, 2026" | 45 CFR 170.215(c) | v1 gone from 1 January 2026 |
| US Core 6.1.0; US Core 3.1.1 adoption expires on 1 January 2026 | 45 CFR 170.215(b) | same |
| OpenID Connect Core 1.0 | 45 CFR 170.215(e) | in force |
| Revoke an app's access "at a patient's direction within 1 hour of the request" | 45 CFR 170.315(g)(10)(vi), revised by HTI-1 | HTI-1 effective 11 March 2024 |
| Refresh tokens valid "no less than three months" for confidential apps | 45 CFR 170.315(g)(10)(v) | in force |
| Patient Access, Provider Access, Payer-to-Payer and Prior Authorization APIs | CMS-0057-F | by 1 January 2027 |
HTI-1 was published at 89 FR 1192 on 9 January 2024; a correction moved its effective date to 11 March 2024. CMS's Interoperability and Prior Authorization final rule (CMS-0057-F), released by CMS on 17 January 2024 and published at 89 FR 8758 on 8 February 2024, applies to Medicare Advantage, Medicaid, CHIP and qualified health plan payers, with Patient Access API usage metrics reported from 1 January 2026. CMS's fact sheet lists "HL7 SMART Application Launch Framework Implementation Guide Release 1.0.0" and "OpenID Connect Core 1.0" among the required standards, allows payers to use updated ONC-approved versions, and recommends SMART App Launch 2.0.0 "to support Backend Services Authorization." Outside regulation, US Core 9.0.0 (STU 9), the current release, says systems "SHALL use TLS version 1.2 or higher" and "SHALL support SMART App Launch Version 2.0.0 or later."
Where does a connected medical device fit into a FHIR integration?
Usually as a backend client, not as a FHIR server. A typical pattern: the device sends readings to the manufacturer's cloud over its own protocol, and the cloud writes Observations into a hospital EHR through SMART Backend Services with a system/ scope. That puts three design rules on the device team:
- Keep FHIR credentials off the device. The private key that signs client assertions belongs in the cloud's key store or an HSM, not in a firmware image where it can be extracted, as the 2021 research found with hard-coded app keys.
- Ask for the narrowest scope.
system/Observation.clets the cloud create readings;system/*.crudswould let a compromised cloud read every record its policy allows. - Bind identity on both hops. The EHR authenticates the cloud; the cloud must authenticate each device (per-device keys or certificates) before it turns a reading into an Observation for a patient.
Medical imaging follows a different, DICOM-based path; see DICOM and PACS cybersecurity.
Worked example: how would a device cloud post readings to an EHR?
Synthetic example for illustration; names, URLs and keys are invented. A home blood-pressure cuff uploads readings to "ExampleCuff Cloud", which posts them to a hospital FHIR server.
- The hospital registers ExampleCuff Cloud as a Backend Services client, with its JWKS URL and the policy "create Observation for enrolled patients only".
- The cloud reads the server's
.well-known/smart-configurationand finds the token endpoint andES384in the supported signing algorithms. - For each token request, the cloud signs a fresh assertion with these claims:
{
"iss": "examplecuff-cloud",
"sub": "examplecuff-cloud",
"aud": "https://ehr.example.org/auth/token",
"exp": 1794571500,
"jti": "5f1c0b6e-7d3a-4e8a-9b2f-1a2b3c4d5e6f"
}
- It requests the scope
system/Observation.cand receives an access token that expires in 300 seconds. - It posts a vital-signs Observation that references the enrolled patient, with a Provenance resource naming the device.
- The server checks the scope and also its own rule that this client may write only for patients enrolled with it. The second check is the object-level authorization FHIR leaves to the implementer.
What should a device maker or health IT vendor verify before launch?
Implement SMART App Launch, not a bespoke OAuth variant— both the user-facing flow and, for system integrations, Backend Services with asymmetric client authentication rather than a long-lived shared secret. Enforce object-level authorization on every read and write, tied to the caller's actual patient/provider relationship — the control FHIR's spec leaves to implementers, and the one "Playing with FHIR" found missing. Require TLS 1.2 or higher per BCP 195 everywhere, with no plaintext fallback, and populate AuditEvent for security-relevant access so an incident is investigable afterward. For patient-facing mobile apps: add certificate pinning and remove hard-coded API keys/tokens from the client binary. If covered by CMS-0057-F or ONC certification, confirm the named standards (SMART App Launch 2.0.0, US Core 6.1.0, OpenID Connect Core 1.0, one-hour patient-directed revocation) rather than a functionally similar flow. Treat the FHIR server as one component of the shipped product's attack surface, not a security boundary on its own — the tokens, keys and TLS libraries it depends on live in firmware, app binaries and backend services that each need their own review, and the HIPAA risk analysis US Core requires (see NIST SP 800-66).
What are the common pitfalls?
- Reading the scope as the authorization decision. A token with
patient/Observation.rssays nothing about which patient's records the server should return unless the server checks the patient in context. - Requesting wildcards for convenience. SMART recommends requesting "only the scopes and permissions they need."
- Long-lived backend tokens. Backend Services tokens should last about five minutes; a cloud that caches one for days defeats revocation.
- Trusting labels downstream. A Restricted label is honoured only where partners agreed to enforce it.
- Certifying against an expired version. SMART 1.0.0 and US Core 3.1.1 adoption ended on 1 January 2026.
Where does firmware component scanning fit, and where doesn't it?
SoftWSP does not test FHIR endpoints, OAuth flows or authorization logic. It covers the component layer under them: it extracts a CycloneDX 1.6 SBOM from a gateway or device firmware image, matches the components — TLS libraries, HTTP clients, JSON parsers — against NVD, CISA KEV, FIRST EPSS and CISA's CSAF ICS advisories, and drafts a cited report for an engineer to review. See firmware SBOM and FDA premarket cybersecurity for how that evidence is used.
This guide draws on HL7's FHIR, SMART App Launch and US Core specifications, the eCFR text of 45 CFR Part 170, the Federal Register records for HTI-1 and CMS-0057-F, CMS's fact sheet, and the Approov/Knight Ink research page. It is general information, not legal or regulatory advice for a specific submission.
Put this guide to work
Frequently asked questions
Is HL7 FHIR itself a secure protocol, or does it leave security to implementers?
FHIR itself is explicit that it isn't. HL7's own FHIR specification states plainly: 'FHIR is not a security protocol, nor does it define any security related functionality,' and that implementers must instead pair FHIR's exchange protocols and content models 'with various security protocols defined elsewhere.' The spec recommends specific building blocks — OAuth 2.0 for authorization, OpenID Connect for user authentication in web-centric settings, TLS per IETF BCP 195 for transport, and an AuditEvent resource for logging — but recommending a building block is not the same as mandating or implementing one. The specification says directly: 'It is the responsibility of implementers to ensure that relevant regulations and other requirements are met.' A FHIR server can be fully conformant to the base specification while having no authentication at all; conformance testing checks data models and exchange semantics, not whether a deployment is actually locked down.
What does SMART App Launch actually require for authorizing an app against a FHIR API?
SMART App Launch is HL7's own implementation guide for applying OAuth 2.0 to FHIR, and it is the piece CMS and ONC now point to as the required security standard (see below). It defines two patterns: SMART App Launch proper, which 'authorizes a user-facing client application ("App") to connect to a FHIR Server' through a browser-based OAuth 2.0 authorization-code flow with user consent, and SMART Backend Services, which 'authorizes a headless or automated client application ("Backend Service") to connect to a FHIR Server' using the OAuth 2.0 client-credentials grant with a JWT assertion as the client's authentication — built on RFC 7523's JWT profile rather than a shared secret. The current release (STU 2.2) also mandates PKCE with S256 on authorization-code requests, and exposes a standard discovery document at '.well-known/smart-configuration' relative to the server's FHIR base URL so a client can find the authorization and token endpoints without hard-coding them. Access itself is scoped: SMART's own language describes this as scopes that 'define specific access permissions that can be delegated to a client application' — but which scopes a given user or app actually receives, and whether the server enforces them correctly per resource, is implementation-specific.
Why did a 2021 security research project call FHIR APIs healthcare's 'last mile' risk, if the standard already has an OAuth-based security framework?
Because having an OAuth framework available and having it correctly enforced per-patient are different claims, and Alissa Knight's 'Playing with FHIR' research (presented at DEF CON 29's Biohacking Village, sponsored by Approov) tested that gap directly against production systems. The published findings: 60% of the FHIR APIs tested contained vulnerabilities, 53% of the mobile apps tested shipped with hard-coded API keys or tokens embedded in the client, and none of the mobile apps tested used certificate pinning, leaving them open to credential-harvesting machine-in-the-middle attacks. Reporting on the research described the core failure as Broken Object Level Authorization across the production APIs tested — an authenticated app could reach records belonging to patients other than the one who had logged in, meaning OAuth correctly verified who the caller was without the server separately verifying which specific records that caller was entitled to see. HL7 responded that the vulnerabilities Knight found 'lie with the implementation of apps and by third-party FHIR aggregators' rather than with the FHIR standard itself — which is consistent with what FHIR's own security page says about scope: the spec was never going to enforce that check for you.
What do CMS and ONC now require for FHIR API security, and by when?
Two federal rules now turn what used to be "recommended" FHIR security practice into a certification and payer requirement, on a firm 2026-2027 timeline. ONC's HTI-1 final rule (effective 11 March 2024) requires health IT certified for the FHIR API criterion (§170.315(g)(10)) to be able to 'revoke an authorized application's access at a patient's direction within one hour of the request' — a deadline that took effect on the rule's effective date — and separately moves certified developers from the SMART App Launch Implementation Guide v1 to v2.0.0, with the v1 guide no longer accepted after 31 December 2025. CMS's Interoperability and Prior Authorization final rule (CMS-0057-F, released 17 January 2024) goes further on the payer side: it requires impacted Medicare Advantage, Medicaid, CHIP and qualified health plan issuers to stand up four FHIR-based APIs — Patient Access, Provider Access, Payer-to-Payer, and Prior Authorization — each required to be implemented by 1 January 2027 (with usage-metrics reporting for the Patient Access API starting a year earlier, 1 January 2026), and the rule names its security standard explicitly: 'OpenID Connect Core 1.0' together with the 'HL7 SMART Application Launch Framework Implementation Guide Release 1.0.0' for authorization. A payer that stands up a FHIR API without actually implementing those named standards is not meeting the rule, regardless of whether the API otherwise returns FHIR-shaped data.
Does using FHIR plus OAuth automatically stop the kind of broken-authorization problem the research found?
No, and this is the single most important distinction in FHIR API security. OAuth 2.0 and SMART App Launch answer 'is this a legitimate app, acting for this authenticated user, with these granted scopes?' — they do not answer 'should this specific request be allowed to read this specific patient's specific record?' That second check is object-level authorization, and FHIR's own specification does not supply it: the spec notes that FHIR 'readily enables RBAC' and 'readily enables ABAC' as general access-control models a server could implement, but building and correctly enforcing the actual per-resource rule — checking a resource's owning patient ID against the authenticated caller's granted context on every single read, not just at login — is server-side application logic FHIR does not provide out of the box. 'Playing with FHIR' found this exact gap in production: APIs that had working OAuth in front of them but no equivalent check behind it, letting one patient's valid session reach another patient's records.
What should a device maker or health IT vendor building a FHIR API actually verify before launch?
Treat FHIR's own framing as the checklist: the protocol gives you the data model and the recommended building blocks, and your implementation is responsible for everything that makes those blocks actually hold. Concretely: implement SMART App Launch (not a bespoke OAuth variant) so clients can rely on standard discovery and scopes; use the Backend Services JWT-assertion flow rather than a long-lived shared secret for any system-to-system integration; enforce TLS per BCP 195 on every endpoint, with no plaintext fallback; add an explicit per-resource authorization check — tied to the authenticated subject's actual patient/provider relationship, not just their authenticated identity — on every read and write, since this is the control FHIR's own spec leaves to you and the exact one 'Playing with FHIR' found missing; populate the AuditEvent resource for security-relevant access so an incident is actually investigable after the fact; and if the API serves a patient-facing mobile app, add certificate pinning and avoid hard-coding API keys or tokens in the client binary, the two specific gaps the 2021 research found in the majority of apps it tested. If the API falls under CMS-0057-F or ONC certification, confirm the specific named standards (SMART App Launch v2, OpenID Connect Core 1.0, one-hour revocation) are implemented, not just "an OAuth flow that works."
Sources
- HL7 FHIR: Security (core specification page — "FHIR is not a security protocol")
- HL7 FHIR: SMART App Launch Implementation Guide
- Approov / Knight Ink: Hacking and Securing FHIR API Implementations ("Playing with FHIR")
- CMS: Fact Sheet — CMS Interoperability and Prior Authorization Final Rule (CMS-0057-F)
- ONC / HealthIT.gov: HTI-1 Final Rule overview fact sheet (PDF)
- HL7 FHIR R5: Security Labels
- HL7 SMART App Launch 2.2.0: Scopes and Launch Context
- HL7 SMART App Launch 2.2.0: Backend Services
- HL7 SMART App Launch 2.2.0: Client Authentication - Asymmetric (public key)
- HL7 US Core Implementation Guide 9.0.0: Security
- eCFR: 45 CFR 170.215 Application Programming Interface Standards
- eCFR: 45 CFR 170.315 2015 Edition health IT certification criteria ((g)(10) standardized API)
- Federal Register: HTI-1 final rule correction, effective date moved to 11 March 2024 (89 FR 8546)
- Federal Register: CMS-0057-F Interoperability and Prior Authorization final rule (89 FR 8758, 8 February 2024)
- OWASP API Security Top 10 2023: API1 Broken Object Level Authorization
About this guide
SoftWSP Regulation Desk
Covers the Medical & regulated devices cluster: 30 guides.

In this cluster
Questions about this page?
