Penetration Testing for Healthcare Companies: What to Scope and Expect
Healthcare penetration testing is a security test of every path that electronic patient data can take: the patient portal, the clinician apps, the APIs that exchange records, the connected devices, and the vendors that touch any of them. The main scoping decision is not "web app or network". It is which of those paths hold ePHI, which ones can hurt a patient if they stop working, and what the tester is allowed to do near them. Get those two answers on paper before testing starts and most of the rest follows.
This post covers scoping and rules of engagement for health IT and digital health teams. It does not go deep on HIPAA obligations; for that, see our post on HIPAA penetration testing requirements.
What makes healthcare pentests different
- The data is regulated and personal. The HHS summary of the HIPAA Security Rule describes national standards for protecting individuals' electronic protected health information (ePHI) that regulated entities, meaning covered entities and business associates, hold. A tester who pulls real patient records into a report has created a new exposure.
- Availability is a safety issue. Downtime in a scheduling tool is an annoyance. Downtime in a medication or monitoring workflow is a clinical risk. HHS's 405(d) program frames its guidance this way: Health Industry Cybersecurity Practices (HICP) is built around threats "that can impact patient safety."
- The estate is mixed. Modern web apps sit next to HL7 interfaces, legacy Windows hosts and network-connected medical devices. HICP's top five threats for the sector include ransomware and attacks against network-connected medical devices (HHS HICP overview).
Step 1: map where ePHI lives and moves
Start with a data-flow inventory, not a list of URLs. For each system, write down:
- What ePHI it stores, processes or transmits
- Which users and which other systems can reach it
- Where it is exposed to the internet
- Who operates it (you, a cloud provider, a vendor)
Systems touching ePHI get the highest-priority scope; a marketing site on a separate domain can be tested separately and cheaper. A simple tiering works:
| Tier | Examples | Testing approach |
|---|---|---|
| 1: holds or brokers ePHI | Patient portal, EHR integrations, FHIR server, billing, telehealth | Authenticated, manual-verified, tested against non-production data |
| 2: adjacent to ePHI | SSO/identity, admin consoles, internal tools, file transfer | Authenticated, focus on access paths into tier 1 |
| 3: no ePHI | Marketing site, status page, docs | External, lighter scope |
Step 2: scope the patient portal and web apps
The patient portal is usually the largest internet-facing target. The core risk is not exotic: it is one patient seeing another patient's data. Test these explicitly:
- IDOR. Can patient A change an ID in a request and read patient B's lab result, invoice or message thread? This needs at least two test accounts per role.
- Role boundaries. Patient, caregiver/proxy, clinician, front desk, billing and admin roles each need their own credentials in scope. Proxy access (a parent viewing a child's record, for instance) is a common source of logic bugs.
- Authentication and recovery. MFA enrollment and bypass, password reset, account lookup responses that reveal whether a patient exists.
An unauthenticated external test finds what an anonymous attacker sees. It will not find the IDOR above, because you have to be logged in to try it. That is why authenticated testing matters most for portals. The OWASP API Security Top 10 has broken object-level authorization at the top for good reason, and healthcare APIs are full of object IDs.
Step 3: scope FHIR and HL7 interfaces
Generic API scanning does not understand healthcare's own API standards.
FHIR (REST/JSON). HL7's own FHIR security page is blunt: FHIR is not a security protocol and does not define security functionality; it expects you to use TLS, authenticate clients, and control access with other standards. The same page tells implementers to validate all input and to test with fuzzing, invalid input and injection attacks. In practice, a FHIR test should cover:
- Unauthenticated discovery. Does
GET [base]/metadataexpose more than intended? Are search endpoints open without a token? - SMART on FHIR authorization. The SMART App Launch specification requires PKCE, a fixed registered
redirect_uri, an unpredictablestatevalue and anaudcheck so tokens are not sent to a counterfeit resource server. Test each: wildcard or open redirect URIs, missing PKCE enforcement, token replay across audiences. - Scope enforcement. SMART scopes such as
patient/*.rsdelegate access, but the spec notes that real limits come from the underlying permission system. Test whether a token scoped to one patient can read another by changing the resource ID or using search parameters.
A read-only discovery request looks like this:
curl -s -H "Accept: application/fhir+json" https://fhir.example.com/metadata | head -c 500
curl -s https://fhir.example.com/.well-known/smart-configuration
HL7 v2 and other interface engines. Older HL7 v2 feeds often run over MLLP on internal ports, with little or no authentication and no encryption. They belong in an internal or network scope, with careful rules (see below), because malformed messages can break an interface engine and stop results flowing.
Step 4: decide how to handle medical devices
If you manufacture a device, or deploy network-connected ones, treat them as a separate workstream with a specialist.
- Manufacturers. FDA's premarket cybersecurity guidance, Cybersecurity in Medical Devices: Quality Management System Considerations and Content of Premarket Submissions, covers device design, labeling and the documentation FDA recommends for submissions, and addresses section 524B of the FD&C Act for cyber devices. The guidance lists penetration testing among the cybersecurity testing a manufacturer should consider. Check the current text with your regulatory team; it is a document you design a testing plan around, not something a scan satisfies.
- Hospitals and clinics. HICP has a dedicated practice for network-connected medical device security. Your scope question is usually segmentation: can a compromised workstation or guest network reach an infusion pump, imaging system or monitoring gateway?
Intrusive tests on devices in clinical use are off the table. Use lab units, vendor test environments or decommissioned equipment. Firmware, hardware and radio testing is a specialist discipline; our IoT pentest scoping post lists the layers involved, and most of it applies to connected medical devices too.
Step 5: include third parties on purpose
Your ePHI usually passes through vendors: EHR platforms, billing clearinghouses, telehealth video, messaging, analytics and cloud storage. You cannot test a vendor's systems without written permission from that vendor. What you can test:
- Your own integration points. API keys, webhooks and service accounts connecting to vendors, and what each is allowed to do.
- Your own cloud configuration. Public storage buckets, overly broad IAM and exposed databases that hold exports from those vendors.
- Secrets in client code. API keys left in JavaScript bundles or mobile apps.
Ask vendors for their latest pentest summary or attestation and record that in your risk file. Do not assume a vendor's report covers your configuration.
Step 6: write safety rules of engagement
This is the section healthcare adds to a normal scope document. Agree these in writing before testing:
| Rule | Why it matters |
|---|---|
| No real patient records in screenshots, evidence or reports | Evidence should show that access was possible, not the data itself |
| No denial-of-service, load or fuzzing against production clinical systems | Availability can be a safety issue |
| Named emergency contact and a "stop now" procedure | Testing halts immediately if anything looks wrong |
| Explicit exclusion list (devices in use, vendor systems without permission) | Prevents accidental out-of-scope testing |
| Stop and report immediately on discovering exposed ePHI | Lets you contain it before the final report |
Prefer non-production environments with synthetic data wherever possible, and test outside peak clinical hours when production is unavoidable.
Where SecurityInfinity fits (and does not)
Our scope is narrower than a full healthcare engagement, so here is exactly what it covers. Startup Pentest tests web applications, APIs, subdomains and cloud exposure. The Authenticated tier (from $999 per application) adds testing across every user role, access-control, IDOR and business-logic review, and API and privilege-escalation testing, with a free retest within 30 days. The External tier starts from $499 per application. Scope and authorization are confirmed by email or a 15-minute call before testing, and only systems you own or are authorized to test are in scope.
That maps to Steps 2 and 3 for your web-facing portal and API layer. It does not cover medical-device testing, firmware, HL7 v2/MLLP interfaces or on-premises clinical networks, and we do not claim HIPAA certification. For those, you need a specialist. For a quick read before any engagement, the API endpoint discovery scanner enumerates REST and GraphQL endpoints and hidden routes, which shows how much API surface your portal exposes. Scans run only against domains you have verified you own, and they are read-only.
What to expect from the engagement
- Before: a scoping call, a written authorization, test accounts for each role, and the rules of engagement above.
- After: a report with evidence, reproduction steps and a specific fix per finding, ranked by severity. Findings that expose patient data between accounts should rank high even when the technical bug looks simple.
- Retest: fix the high and critical items, then verify. Ask whether retesting is included; ours is within 30 days on the Authenticated tier.
If your portal and APIs are the part of the estate you can test this month, start with a scan or book a Startup Pentest.
Frequently asked questions
What should a healthcare penetration test cover?
It should cover every system that stores, processes or transmits ePHI: patient portals, clinician and admin apps, FHIR and HL7 interfaces, cloud storage, identity and SSO, and the integrations to vendors. Network-connected devices and internal segmentation are scoped separately, with stricter safety rules.
Is a vulnerability scan enough for a healthcare company?
A scan finds known issues and exposed assets, which is useful as a baseline. It does not reliably find authorization flaws such as one patient reading another's record, because that takes authenticated, role-aware testing. Most healthcare programs need both.
Can we pentest production systems that hold patient data?
You can, but many teams avoid it for clinical systems. Use non-production environments with synthetic data where possible, and where production testing is necessary, agree on windows, rate limits, a stop procedure and a ban on denial-of-service testing in writing first.
How do we test FHIR APIs safely?
Authorize the test in writing, use test patients and test tokens, and start with read-only requests such as the metadata and SMART configuration endpoints. Then test SMART authorization (PKCE, redirect URIs, audience) and per-patient access control. Avoid bulk export and load tests against production.
Do we need to test our vendors too?
You need assurance about them, but you cannot test their systems without their written permission. Test your own configuration and integrations with each vendor, and request their pentest summary or attestation for the parts you do not control.