HIPAA Compliant GPTby ClinicFrame
← Back to blog

Published November 6, 2026· 16 min read

Prompt Injection in Medical Documents Guide for Clinicians

A clinical compliance dossier, checklist, key, and tablet arranged for review

Prompt injection happens when text inside something an AI tool reads is treated by the model as an instruction. In clinical work, the risky material is usually a document you did not write: an outside record, a referral letter, a faxed PDF, a patient-submitted form, or an image. A sentence hidden in that file can push an AI summary to leave out an allergy, soften a risk statement, or recommend something unsafe.

Two peer-reviewed studies published in 2025 showed that widely used models can be steered this way in medical scenarios. Security guidance from OWASP and the UK National Cyber Security Centre says there is no complete fix yet. The practical response for a practice is to treat outside documents as untrusted input, limit what an AI tool can do on its own, and keep a clinician checking the details that can hurt a patient.

This guide explains how prompt injection works in plain terms, where it can hide in clinical documents, what the research shows, how it connects to HIPAA, and what to ask an AI vendor before you upload outside records.

What Prompt Injection Is

The OWASP Gen AI Security Project lists prompt injection as LLM01, the first entry in its 2025 Top 10 risks for large language model applications. OWASP describes it as input that alters a model's behavior or output in unintended ways. It also notes that these inputs "do not need to be human-visible/readable, as long as the content is parsed by the model."

The root problem is that a language model reads your request and the document you attach as one stream of text. It has no reliable built-in way to tell "this is the clinician's instruction" from "this is content to summarize." The UK National Cyber Security Centre made this point in a December 8, 2025 blog post, arguing that prompt injection should not be treated like SQL injection because models do not separate instructions from data. The NCSC recommends reducing the risk and impact rather than expecting a single fix.

There are two main types.

TypeWhere the instruction comes fromClinical example
Direct prompt injectionThe person typing into the AI toolA user tries to get a clinical assistant to ignore its rules or reveal its setup
Indirect prompt injectionContent the AI reads, such as a file, web page, email, or imageAn outside record contains hidden text telling the AI to omit certain findings from the summary

For clinicians, indirect injection is usually the one that matters. You are not the attacker. The risk arrives inside a document you asked the AI to help with. NIST's adversarial machine learning taxonomy (NIST AI 100-2 E2025, published March 2025) gives indirect prompt injection its own section on attacks and mitigations.

OWASP also describes unintentional injection. A document can contain instruction-like text that was never meant as an attack, such as leftover template wording or a note written to another reader, and the model may still follow it. A clinical file does not need a malicious author to produce a misleading summary.

Where Prompt Injection Can Hide in Clinical Documents

Any content an AI tool reads can carry instructions. The table below maps common clinical inputs to the way hidden text can get into them.

InputHow instructions can be hiddenWhat a successful injection could try to change
Outside records and referral PDFsWhite or tiny text, text behind images, comments, or document metadata that the model reads but you do not seeOmit a diagnosis, medication, or allergy from the summary; change the stated reason for referral
Faxed and scanned documentsText inside the image that the tool reads through text recognitionInsert content that does not appear to be in the visible page
Patient intake forms and portal messagesFree-text fields where anyone can type anythingSteer how the AI frames symptoms, history, or urgency
Medical imagesLow-contrast or very small text embedded in the imageChange how a model describes findings (see the 2025 oncology study below)
Web pages, drug references, and emails pasted into a chatHidden page text or formatting copied along with the visible contentAdd claims or recommendations that are not in the source you meant to use
Earlier AI-generated draftsLeftover instructions or notes in a reused draft or templateRepeat or follow instructions that no longer apply

The common thread is that the clinician sees one version of the document and the model reads another, longer one. That gap applies to any tool you paste content into. The guide Is ChatGPT HIPAA compliant? explains how account type changes what happens to content pasted into a general chat tool, and HIPAA Compliant GPT's data journey page shows where content goes after it is sent in that product.

What the Research Shows

Both studies below are controlled experiments. They show what is possible and how often attacks worked under test conditions. They do not measure how often prompt injection happens in real clinics.

Prompt injection in medical images (Nature Communications, February 2025)

Clusmann and colleagues tested four vision-language models (Claude-3 Opus, Claude-3.5 Sonnet, Reka Core, and GPT-4o) on oncology imaging tasks in a study published in Nature Communications. Using 594 attacks, they reported that all four models were susceptible. Prompts embedded in medical images at a level the authors describe as "non-obvious to human observers" could cause the models to give harmful output. The authors concluded that this vulnerability should be addressed before widespread clinical adoption.

Prompt injection in medical advice (JAMA Network Open, December 2025)

Lee and colleagues ran a simulation of 216 patient-AI dialogues, published December 19, 2025 in JAMA Network Open. In the main experiment with three lightweight models (GPT-4o-mini, Gemini-2.0-flash-lite, and Claude-3-haiku):

  • Injection attacks succeeded in 94.4% of evaluations (102 of 108).
  • The manipulation persisted into follow-up turns in 69.4% of evaluations.
  • In extremely high-harm scenarios, including FDA Category X pregnancy drugs such as thalidomide, attacks succeeded in 91.7% of dialogues (33 of 36).

A smaller proof-of-concept test on three flagship models found GPT-5 and Gemini 2.5 Pro vulnerable in 5 of 5 dialogues each, and Claude 4.5 Sonnet in 4 of 5. The authors concluded that current safeguards "remain inadequate" to prevent manipulation that could produce life-threatening recommendations.

Both studies tested general-purpose models. A healthcare product built on a model adds its own instructions and safeguards, which can change results in either direction. That is why the vendor questions later in this guide matter. The ChatGPT for Clinicians compliance review shows the kind of product-level documentation worth reading, separate from the model underneath.

What an Injected Document Can Actually Do

The harm from prompt injection depends on what the AI tool is allowed to do. OWASP says the impact depends on "the agency with which the model is architected." A tool that can only draft text has a different risk profile from one that can send messages or write to a chart.

What the AI tool can doRealistic harm from a successful injectionControl that limits it
Read a document and draft a summary or noteAltered, missing, or invented details in the draftClinician review of the draft against the source before it becomes an approved note
Show links or images in its answers, or browse the webData leaving the session through a link or image request (OWASP describes this scenario)Turn off link and image rendering and web browsing when PHI is in the conversation
Remember instructions across sessionsA manipulated instruction carried into later workReview saved instructions and memory regularly
Send email, write to the EHR, place orders, or call other toolsActions taken on someone's behalf without the clinician intending themLeast-privilege access and human approval for every consequential action

For a small practice, the first row describes a typical setup, and it is easier to govern than the others. The risk is still real: a summary that drops a penicillin allergy or misstates a suicide risk assessment can cause harm if it is pasted into the chart unchecked. If you are choosing between tool types, the comparison of AI scribes and dictation explains how they differ in what they capture and what they touch.

Why Prompt Injection Is a HIPAA Question, Not Only an IT Question

HIPAA does not mention prompt injection by name, but three parts of it apply.

  • Risk analysis. The Security Rule requires covered entities and business associates to assess risks to the confidentiality, integrity, and availability of electronic PHI (45 CFR 164.308(a)(1)). An AI tool that reads outside records is part of that environment, and HHS guidance expects the assessment to cover all ePHI the organization creates, receives, maintains, or transmits.
  • Integrity. The Security Rule's integrity standard calls for policies and procedures to protect ePHI from improper alteration or destruction (45 CFR 164.312(c)(1)). A manipulated AI draft that reaches the chart without review is an integrity problem.
  • Breach notification. If an injection causes PHI to be disclosed to someone who should not have it, the Breach Notification Rule presumes a breach unless a risk assessment shows a low probability that the PHI was compromised. The response steps later in this guide cover what to do.

Two common assumptions need correcting:

  • A BAA does not stop prompt injection. A business associate agreement sets out who is responsible for protecting PHI and reporting incidents. It is necessary for PHI use, but it is a contract, not a technical control. The post on what makes AI HIPAA compliant covers what a BAA does and does not settle.
  • De-identifying PHI does not stop prompt injection. Removing identifiers reduces what a model can see about the patient. It does not stop instructions hidden in a document from steering what the model writes. A tool can protect identifiers well and still produce a manipulated summary.

A Practical Checklist for Clinics

These steps are drawn from OWASP's mitigation list and the NCSC's advice to reduce impact, adapted for a small practice.

  • Treat outside documents as untrusted input. Records from other organizations, patient-submitted forms, faxes, and web content are the main source of indirect injection.
  • Check the dangerous details against the source. Medications and doses, allergies, diagnoses, dates, lab values, and risk statements should be confirmed in the original document before an AI draft becomes an approved note.
  • Keep summarizing separate from acting. Do not use the same AI session that reads outside documents to send messages, update the chart, or trigger other tools.
  • Paste the section you need, not the whole file. Smaller inputs reduce how much unseen content reaches the model. Copied text can still carry hidden characters, so this reduces exposure but does not remove it.
  • Watch for warning signs. Treat a draft as suspect if it includes facts that are not in the document, asks you to take an action, includes links you did not expect, changes tone abruptly, or recommends something that conflicts with the record.
  • Turn off features you do not need. Web browsing, link rendering, connected apps, and saved memory each add ways for an injection to do more than change text.
  • Write it into policy. Add AI tools that read ePHI to your risk analysis, define which document types staff may upload, and give staff a way to report an odd output.
  • Tell patients how AI is used. If AI helps summarize their records, the practice's disclosure approach should say so. The guide on telling patients you use AI covers the wording.

Dangerous Details to Check, by Specialty

Step 2 of the checklist matters especially when the details are specialty-specific. The table below lists outside documents each specialty commonly receives and the details worth confirming against the source before an AI draft becomes part of the record.

SpecialtyOutside documents that often arriveDetails to confirm against the source
Mental health and therapyPrior treatment summaries, psychological evaluations, intake questionnairesSuicide and violence risk history, safety plan elements, substance use, diagnoses, and what the release of information covers
Psychiatry and PMHNPOutside medication lists, discharge summaries, pharmacy recordsMedication names and doses, controlled substances, prior medication trials and reasons for stopping, and relevant results such as lithium levels or ECG findings
Dentists and hygienistsMedical history forms, physician clearance lettersAnticoagulant and antiplatelet use, antiresorptive therapy history, allergies including local anesthetics and latex, and premedication instructions from the physician
Physical and occupational therapySurgical referrals, operative notes, post-op protocolsWeight-bearing status, range-of-motion limits, precautions, surgery date, and protocol phase

These are the same details that make a summary dangerous when they are wrong, whether the error comes from an injected instruction or an ordinary model mistake. Building them into the review step covers both.

What to Do If a Draft Looks Manipulated

A suspicious draft is not proof of an attack, since models also make ordinary errors. The response is similar either way: keep the draft out of the chart and find out what happened.

  • Stop using the draft. Do not paste it into the record. If part of it was already charted, correct it through your normal amendment process.
  • Keep the evidence. Save the source document and the AI output, or screenshots of both, so someone can review them later.
  • Tell the right person. HIPAA requires covered entities to designate a security official and a privacy official. Report the event to whoever holds those roles in your practice.
  • Check whether PHI left the session. If the draft contained a link that was opened, or the tool sent a message or took another action, someone needs to assess whether PHI was disclosed. HHS's Breach Notification Rule page lists the factors for that risk assessment.
  • Report it to the vendor. Share the document type, the date, and the output, ask what their logs show, and follow the incident reporting terms in your BAA.
  • Adjust the workflow. If one document type keeps causing problems, route it through manual review instead of AI summarization.

Questions to Ask an AI Vendor

OWASP states that "it is unclear if there are fool-proof methods of prevention for prompt injection." A vendor that says its product prevents prompt injection should be able to show evidence for that claim.

QuestionWhy it mattersAn answer worth hearing
Can the product take actions, such as sending messages, browsing, writing to the EHR, or calling other tools?Actions raise the impact of a successful injectionA clear list of actions, with human approval required for each consequential one
How does the product separate uploaded content from user instructions?OWASP recommends segregating and labeling external contentA specific description, not a general statement that the model is "safe"
Are links and images in AI answers rendered automatically?Rendered links and images can carry data out of a sessionOff by default, or configurable by an administrator
Do you test for prompt injection, and can you share a summary of the results?OWASP recommends regular adversarial testingA dated summary of what was tested and what was found
What logs can we review if an output looks wrong?You need a record to investigate and to complete a breach risk assessmentAccessible logs with retention you control
How does the BAA handle incidents caused by manipulated AI output?Incident reporting duties should cover AI-related eventsClear notification terms that do not exclude AI behavior
Which models receive our content, and are they listed as subprocessors?Your risk analysis needs to know where the content goesA named list, or a dated status if the list is still being prepared

For the model-level questions in the last row, the guide to HIPAA compliant LLMs explains how model access and BAAs fit together, and Is Claude HIPAA compliant? walks through one model provider's options.

Where HIPAA Compliant GPT Stands

Checked November 22, 2026, against HIPAA Compliant GPT's public security ledger, data journey, and ClinicFrame's security page. HIPAA Compliant GPT runs on ClinicFrame.

  • Scope of the product. HIPAA Compliant GPT records visits, drafts notes, and answers questions over referrals and uploaded records. The ledger states that EHR write-back is not part of the product today. Fewer connected actions means less a manipulated output can do on its own. That is a fact about scope, not a prompt-injection defense.
  • Source citations. When the Assistant answers from a file, it names the file and the page. That makes the review step above faster, because you can open the passage behind a claim. It is a review aid, not a prompt-injection defense.
  • What the ledger does not list. The public ledger does not currently list a prompt-injection control or test result. Practices that upload outside records should apply the clinician review steps above and ask about current status directly.
  • Certifications. SOC 2 Type II and HITRUST are not claimed.
  • BAA and pricing. A BAA comes with every plan, including the Free plan, which needs no card. Current plans are on the pricing page.

Who Should Act on This First

  • Practices that summarize outside records with AI. Behavioral health intakes, specialist referrals, and records requests bring in documents no one at the practice wrote.
  • Practices using AI scribes or note tools with connected features. If a tool can send, sync, or write, review which actions it can take without approval. The roundup of HIPAA compliant AI scribes covers what to test before choosing one.
  • Compliance reviewers updating a risk analysis. Prompt injection belongs alongside access control, retention, and subprocessors when an AI tool reads ePHI.

Bottom Line

Prompt injection turns the documents a practice receives into a possible way to steer an AI tool. The 2025 studies show that widely used models can be manipulated in medical scenarios at high rates under test conditions, and current security guidance does not expect a complete fix soon. The controls that work today are practical: treat outside documents as untrusted, limit what the AI can do, verify the dangerous details against the source, and ask vendors for dated evidence rather than assurances. The post on security ledgers versus trust badges explains what that evidence looks like in practice.

Frequently Asked Questions (FAQs)

What is prompt injection in healthcare AI?

Prompt injection is text that an AI model treats as an instruction even though it arrived as content, such as a sentence hidden in an outside record. In healthcare it can change what an AI summary or draft says, including leaving out allergies, medications, or risk findings.

Can a PDF contain hidden instructions for an AI tool?

Yes. Text can be hidden in a PDF through white or very small fonts, comments, metadata, or text inside images. OWASP notes that injected content does not need to be visible to humans as long as the model reads it.

Is prompt injection a HIPAA violation?

Prompt injection is not named in HIPAA. Its effects can still raise HIPAA issues. A manipulated note can be an integrity problem under the Security Rule, and an injection that discloses PHI to the wrong party may be a breach that requires a risk assessment under the Breach Notification Rule.

Does a BAA protect against prompt injection?

No. A BAA is a contract that sets responsibilities for protecting PHI and reporting incidents. It does not technically stop a model from following hidden instructions. You still need product controls and clinician review.

Can AI vendors fully prevent prompt injection?

Current guidance says no. OWASP states it is unclear whether fool-proof prevention exists, and the UK NCSC says the risk may never be fully mitigated in the way SQL injection was. Vendors can reduce the risk and limit its impact.

Is it safe to upload outside medical records to an AI tool?

It can be acceptable when the tool is covered by a BAA, the upload fits your risk analysis, and a clinician checks the output against the source. Treat outside records as untrusted input, and avoid using the same session to take actions such as sending messages or updating the chart.

How can I tell if an AI summary has been manipulated?

Compare high-risk details with the original document: medications, doses, allergies, diagnoses, dates, and risk statements. Be suspicious of drafts that include facts not in the source, ask you to do something, contain unexpected links, or contradict the record.

Does de-identifying PHI stop prompt injection?

No. De-identification, defined in the HIPAA Compliant GPT glossary, removes identifiers before content reaches a model, which reduces what the model sees about the patient. Instructions hidden in the document can still influence what the model writes, so clinician review is still required.