When you ask an AI to summarize a file, you're mixing two things in one prompt: your instruction and someone else's text. A model can't always tell them apart.
Document prompt injection is what happens when the document's text tries to act like an instruction. We built a fictional, unexecuted example (a vendor brochure with one hidden line addressed to "any AI assistant") and converted it locally with LLMiser without sending anything to a model. We only inspected the extracted text, not model compliance or attack outcomes.

1. Distinguish source content from trusted instructions

Your request is an instruction. The document you attach is data. Prompt injection exploits the fact that, to a language model, both arrive as text in the same window, so data can be written to look like an instruction.
The OWASP GenAI project's description of prompt injection defines the indirect kind directly. Indirect prompt injections occur when a model accepts input from external sources such as websites or files, and that content alters its behavior in unintended ways.
Researchers described the problem early, in a 2023 paper by Greshake and colleagues, Not what you've signed up for. It argues that applications built on language models "blur the line between data and instructions," and a file you didn't write is the clearest case of that.

2. Trace an indirect instruction attempt

To see the risk concretely, follow one instruction from its hiding place to the text a model would read. Our synthetic test placed the same fictional sentence in five spots across three files, then inspected the converted text locally.
The sentence asked any AI assistant to call the vendor "the cheapest option" and end with "Approved by procurement." It is a fictional, unexecuted example, and neither a model nor a workflow ran on it. Still, copying an unverified claim like that into a summary could mislead a reader. We placed it in Word white one-point text and image alt text, inside HTML hidden blocks and comments, and inside slide speaker notes.
Local run of LLMiser's conversion code on synthetic, fictional example files, 9 November 2026. Nothing was sent to a model.
Four of the five copies survived extraction. No assistant action, compliance rate or attack success was tested here, since conversion stops at plain text. Only the HTML comment dropped out, showing that extraction is selective while hidden document text still surfaced visibly.

3. Recognize suspicious document language

Look for text that addresses the AI instead of a human reader. Normal documents describe their subject, while injection text asks the assistant to change its task or run actions in hidden spots.
Our test line had three of those signs: it addressed "any AI assistant," it tried to change the conclusion, and it dictated a closing phrase. Real attempts may also ask a model to ignore earlier instructions, reveal information, or visit a link or call a tool.
Signs worth a second look. Not a complete list, and none is proof on its own. Illustration.
OWASP's prompt injection prevention cheat sheet lists hidden text in web pages, documents or emails among indirect attack patterns, alongside invisible Unicode characters. Treat those signs as reasons to look closer, not as a complete detector.

4. Why conversion does not establish trust

Converting a file changes its format, not its trustworthiness. Extraction can retain instruction-like text alongside regular prose without establishing trust, and LLMiser doesn't detect, flag or strip injected directives.
There's a useful side effect, though. In our test, conversion exposed hidden text instead of hiding it. White one-point text and a collapsed web block became plain lines you can see in the reader. Reviewing the Markdown is often easier than inspecting a styled original.
But visible isn't harmless. The same plain line goes to the model if you paste the result as is. LLMiser is a document preparation tool, not a security boundary, so the review step stays with you.

5. Use review and limited downstream permissions

Read the converted text before it reaches a model, and keep anything a model does with it behind your own approval. Review catches what you can see, and limited permissions contain what you can't.
Start with the text. Search the converted Markdown for lines that address an assistant, then delete or quote them. When you prompt, say plainly that the document is material to analyze, not instructions to follow. That helps, though no prompt rule closes the boundary completely.
Permissions limit damage that review misses. Illustration.
Then limit what can happen next. OWASP's cheat sheet recommends enforcing permissions at the tool boundary and applying least privilege, and it notes that a prompt asking for human review doesn't itself stop an action. If a document-driven workflow can send messages or change records, put a person in front of that step.

6. Know the limits of detection

No search or filter catches every instruction attempt. Phrasing changes, languages differ and text can hide in images, so treat any detection step as one layer, never as proof that a document is clean.
Searching for "AI assistant" flagged every converted file. That simple scan still misses reworded phrasing, another language or text inside an image, and OWASP's cheat sheet puts it plainly: screening doesn't stop an injection that it fails to detect.
Layered checks for external documents. Illustration.
Combine the layers: review, careful prompting, limited permissions and human approval for anything consequential. For what LLMiser does and doesn't do with your files, see the use cases page.

Frequently Asked Questions

What is document prompt injection?

It's text inside a file that tries to make an AI follow it instead of your request. It's a form of indirect prompt injection, where the instruction arrives through content the model reads rather than from you. The text can be visible or hidden in formatting, notes or metadata.

Does LLMiser remove prompt injection from documents?

No. Extraction can retain instruction-like text and does not establish trust, so LLMiser neither detects nor strips injected directives. While HTML comments dropped out in our check and hidden styles surfaced plainly for review, four copies of the directive remained in the text.

Can hidden text in a Word file reach an AI?

Yes. In our test, white one-point text and an image's alt text in a Word file both appeared in the converted Markdown. A person reading the original would likely miss them, while a model reading the text would not.

Is it safe to summarize a document from an unknown source?

It can be, if the summary only goes to you and you review it. Risk grows when a model's output can trigger actions, such as sending messages or changing data. Keep those steps behind human approval.

Will telling the model to ignore document instructions stop injection?

It helps as one layer, not as a boundary you can rely on alone. Clear prompts reduce the chance a model follows embedded text, while security guidance treats them as one layer alongside tool limits and reviewing consequential outputs.

How is prompt injection different from an outdated document?

An outdated document gives wrong facts in good faith. An injection attempt tries to change what the model does. Both need review, but conflicting versions call for checking dates and sources, not hunting for instructions.
Converting a file you didn't write? Use LLMiser to read it as plain text first, then decide what goes into your prompt.