# When File Ingestion Misleads Language Models: Measuring and Mitigating Divergences in Office Documents

Text extractors show LLMs a different Office document than humans see

Penghui Li · arXiv · 2026-11-4

- **Problem** Text extractors give LLMs content that differs from what a human sees in an Office file. Extractors read hidden parts and drop visible ones.
- **Method** Prism rebuilds the reviewer's view from the OOXML markup, without rendering it. It applies display formats and reading order, and sends only the rest to a render oracle.
- **Results** Attacks succeeded in 64% of 400 trials across four chat assistants and four coding agents. Every tested system was misled by at least one attack.

## Why a model and a reviewer read the same file differently

An Office file is a ZIP package of XML parts, and its display rules decide what a reader actually sees. Processing these files with an LLM first requires converting them, and text extraction is the dominant approach. A person reviewing the file in Word, Excel or PowerPoint sees the rendered result, so the two views can diverge.

The budget example shows the gap: cell B9 stores 1,000,000, but the number format with a trailing comma displays it as $1,000. The trailing comma divides the stored number by one thousand before display, a common Excel feature for showing figures in thousands. markitdown returns the stored value without applying the display format, so the model receives a budget of $1,000,000.

If the model then summarizes the budget or supports a financial decision with it, it may act on an amount the approver never saw. This gap is an extraction divergence, and malware scanners and prompt-injection detectors don't flag it because the file carries no malicious instructions.

The adversary can craft a file that looks benign to the reviewer yet conveys different information to the LLM. The adversary can publish such a file as a template or send it as an email attachment, and the victim simply uploads it. Prior work on hidden text focused mainly on PDFs, where hidden text carries injected instructions.

Extractors make their own choices about which parts to read, whether to apply display rules, and how to order content. Many extractors declare the XML names they read in a descriptor framework, which hides those names from standard code search. Extractors also emit only part of what their base libraries read, so the reading itself doesn't predict the output.

This is why the paper measures extractor output directly instead of assuming what each one reads.

## Measuring which channels extractors read

Extractor behavior is largely undocumented, so the authors measure the attack primitives directly before building any attack. They combine static analysis of each extractor's library with dynamic analysis of what reaches the extractor's output.

Many OOXML libraries declare the XML names they read in descriptor declarations, so ordinary code search misses those names. The static analysis reads these declarations and links classes into a containment graph to find the selectors each library can reach. Modeling the framework lets the analysis find 179 elements and 67 attributes for python-pptx, where a plain string search finds only two element selectors.

The dynamic analysis places unique marker strings, or canaries, at text-bearing locations and searches each extractor's output for them. A missing canary shows that the extractor dropped or altered that location, while a found canary shows the content reached the output. Each channel is labeled as visible or invisible in the default view, so injection and omission can be separated.

Of these, 19 expose content a human cannot see and 12 drop content a human can see. The split differs by format: PPTX extractors mainly inject content, while DOCX extractors mainly omit it.

![Table 1: Visibility discrepancies by format and extractor (channel counts). Injection counts channels that are invisible but extracted. Omission counts channel…](https://refivu.com/papers/69840035-4f93-450d-8f5f-605bdde7d86f/figures/figure-fd692b00559c0ca1d73db136a67545f1.png?thumb=512)

**Table 1** : Visibility discrepancies by format and extractor (channel counts). Injection counts channels that are invisible but extracted. Omission counts channels that are visible but not extracted. Each of the ten extractors appears on the formats it supports.

[Original paper](https://arxiv.org/abs/2611.05806v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

Extractors also differ in how they order and format the content they emit, not only in which content they read. On a PowerPoint slide, four of the five extractors serialize shapes in an order other than the visual one. Six of seven spreadsheet tools output stored numbers instead of displayed ones, and every one of the six Word extractors joins a word split across runs.

## Five file-only attacks turn measured divergences into misleading documents

The authors group the five attacks into two classes, content-based and presentation-based attacks. Presentation-based attacks keep the content intact and change how the model reads it, using display rules that extractors ignore. All five use standard OOXML features, so the crafted files stay valid and open normally in Office applications.

The attacker's file includes no malicious instructions, so prompt-injection detectors have nothing to flag.

Hidden injection places a false SOC 2 Type II certification claim in a w:vanish run and a vendor-approval claim in alternative text. The default view shows neither claim, yet markitdown and python-docx emit the hidden run as ordinary report content. Silent omission works in the opposite direction: a footer stating a maximum safe pressure of 80 psi is visible on the page.

A body-only extractor reads only document.xml, so it drops the footer and the model summarizes the manual without the limit. The omitted limit is not a false statement, so each sentence of the answer can be correct while the answer still leaves out the limit.

The formatting attack stores 1,000,000 in a cell and attaches a number format that displays it as $1,000. Value-altering formats occur in 7% of benign spreadsheets, so a crafted file doesn't stand out. Spatial order inversion places three text boxes whose offsets are raised by one coordinate unit each, at y values 998, 999, and 1000. The shape-tree order and a strict (y,x) sort both emit Client indemnifies Contractor, while the slide visually reads Contractor indemnifies Client.

Sub-word regrouping hides the prefix un in a w:vanish run just before the visible word authorized.

## Results on chat assistants and coding agents

The authors tested four chat assistants and four coding agents, with ten trials for each scenario and system. Chat assistants received a plain summary request, while the coding agents received a task prompt for each document. A response counted as misled only when it adopted the attacker's reading without noting any discrepancy, and chat responses were judged by an LLM judge, Claude Opus 5.5.

Across the 400 trials, the attacks succeeded in 64% of them.

![Table 4: Successful attacks (of ten trials) per scenario and system in the end-to-end evaluation. Content-1 is hidden injection, Content-2 silent omission, Pre…](https://refivu.com/papers/69840035-4f93-450d-8f5f-605bdde7d86f/figures/figure-d25d2e5290d59269643277c715d9a729.png?thumb=512)

**Table 4** : Successful attacks (of ten trials) per scenario and system in the end-to-end evaluation. Content-1 is hidden injection, Content-2 silent omission, Pres.-1 formatting divergence, Pres.-2 spatial order inversion, and Comb. sub-word regrouping. ASR is each system’s overall success rate. The last row gives each attack’s success rate across systems.

[Original paper](https://arxiv.org/abs/2611.05806v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Penghui Li · When File Ingestion Misleads Language Models: Measuring and Mitigating Divergences in Office Documents · Original paper figure · Extracted the figure area from page 8 of the original PDF.

Formatting divergence was the most effective attack, with 88% success across all systems. Hidden injection misled five systems in all ten trials, and sub-word regrouping misled five in at least nine.

How easily a system is misled seems to follow from the software that converts the file into model input. Claude's chat assistant was misled in 80% of trials, but Claude Code was misled in 24%. Gemini was misled in 100% of trials, while Google's Antigravity was misled in 22%.

Every evaluated system was beaten by at least one attack, and none resisted all five. The two most resistant systems each failed completely once: Claude Code on the formatting attack, and Antigravity on the silent omission one. Spatial order inversion succeeded less often against coding agents, which the authors attribute to agents inspecting shape coordinates after unpacking the file.

## Rebuilding the reviewer's view from the specification

Prism rests on one observation: much of what a viewer shows is set by the specification itself. So it reconstructs that part from the markup without rendering, and sends only the remainder to a slower render oracle. The reconstruction is written as \\( C(f) \\), and in mediation mode the model reads it in place of the extractor's output.

The static interpreter builds the reconstruction from four operations, applied in the order shown below. \\\[ C(f)=\\mathrm{serialize}(\\mathrm{order}(\\mathrm{display}(\\mathrm{visible}(\\mathrm{atoms}(f))))) \\\] atoms collects content units such as runs, cells and positioned objects, and visible removes what the default view hides. display applies number formats to stored values, order applies the orderings the specification defines, and serialize assembles the retained units into text.

The first two steps address injection and omission, display handles formatting, and order and serialize handle ordering and run assembly.

Many display decisions depend on context, so the interpreter applies several rules rather than one field lookup. Text colored like the page counts as hidden, but the interpreter applies that rule only to white text on a white page. Compatibility wrappers keep only the Choice branch, and headers, footers and notes count as visible content only if the body points to them.

Number formats are evaluated from scratch under ECMA-376, so the result doesn't depend on one renderer.

The authors call this banding a heuristic, because an attacker can push a box past the band while a human still reads it as one line. On the budget example, the interpreter displays the total as 1,000 and reads the referenced footer that states the 80 psi limit.

Line breaking, pagination and overlap depend on the engine, so the file alone doesn't settle the human view. The render oracle renders with several engines, reads each rendering with a VLM, and emits the text where the engines agree. A floating text box holding a single negation can turn 'valid' into 'not valid', depending on where the renderer places it.

Prism runs in two modes: mediation replaces the application's extractor, and checking compares an existing extractor's output with the reconstruction. The checking mode's findings fall into four classes: hidden injected content, omitted visible content, formatting mismatch and reordering. It tolerates reorderings of whole lines that keep the same words, so a deck authored out of reading order isn't flagged.

## How well the defense holds up

Prism's reconstruction reproduces the human view for every crafted attack, and the authors check this against the naive markitdown output. The render oracle restores the slide's visual order in the reading-order cases, which the paper covers in its appendix. Models given Prism's reconstruction answer correctly in every trial, while the naive extraction misleads the same models in every trial.

To test unseen payloads, the authors wrote 28 additional attack payloads, seven for each mechanism the static interpreter handles. A naive extractor diverged on all 28 documents, while the static interpreter recovered the human view on all 28. The three models were misled in all 84 answers built from the naive extraction and in none of the 84 built from Prism's reconstruction.

Of the 19 invisible channels that some extractor exposes, 9 sit in DOCX and XLSX, the two formats the interpreter supports. For reading order, the render oracle ran on 26 PowerPoint layouts, and eight of them were order-inversion attacks. It recovered the constructed visual order on all 14 layouts with a single defined reading order, including all 8 attacks.

On 193 benign Apache POI documents, the checking mode flagged 5 documents, or 2.6%. The authors count these as false alarms, even though several reveal real divergences such as text placed outside the visible slide canvas. The static interpreter takes about 0.5 ms per document, against 63 ms for markitdown. The render oracle takes about 12 s per document, and 99% of presentations have several positioned text shapes, so they usually pay that cost.

## What the evidence does not cover

The end-to-end study rests on a small number of documents per attack scenario, which limits what the results can show. That constraint caps how many documents and repetitions were feasible for each system. The additional payloads in §6.4 suggest the variants behave alike, since the naive extractor diverged on all of them. The results also describe each product only at the time of evaluation, because vendors can change ingestion paths without notice.

The attacks still succeed against applications whose extractors the authors don't know, because they exploit display semantics that most extractors don't implement.

The render oracle reads the rendered image, and evaluating it on such text is future work.

The study covers Office formats only, and it doesn't cover legacy binary formats such as DOC, XLS, and PPT. Visible text that tries to steer the render order remains a risk the authors leave to future work.

## Paper info

- **Authors**: Penghui Li
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-4
- **Added**: 2026-11-6
- **Updated**: 2026-11-4
- **Version**: v1
- **arXiv**: 2611.05806
- **Category**: cs.CR · cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.05806v1) · [PDF ↗](https://arxiv.org/pdf/2611.05806v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Office documents are now routinely uploaded to large language models (LLMs) for processing. However, an LLM does not always see what a human sees, because it typically reads the text that an extractor produces from the document's underlying Office Open XML (OOXML) files. Depending on the implementation, extractors differ in which OOXML parts they read and how they interpret them, so their output can differ from what Office applications display. For example, by slightly shifting the positions of text boxes on a slide, an adversary can swap the order in which the model reads them while the slide looks unchanged. We show that this extraction divergence is an attack surface for LLM applications. In this work, we first measure what an adversary can exploit by analyzing the widely used extractors that LLM applications rely on. By combining static source code analysis with dynamic analysis, we identify 19 OOXML channels where extractors read content a human cannot see and 12 where they drop content a human can. We also find that widely used extractors ignore display formatting and reading order, so even visible content reaches the model in a different form. Building on these findings, we construct five attacks that lead the model to interpret a document differently from a human reviewer, without injecting any instruction. We test the attacks on four major chat assistants (ChatGPT, Claude, Gemini, and Microsoft 365 Copilot) and four coding agents (Codex, Claude Code, Antigravity, and GitHub Copilot CLI), and every one of them is misled by at least one attack. Finally, we propose Prism, a lightweight defense that reconstructs the human view from the OOXML specification before passing the text to the model. Prism also generalizes to unseen attack payloads.

## Quote from the paper

Penghui Li (2026). When File Ingestion Misleads Language Models: Measuring and Mitigating Divergences in Office Documents. arXiv:2611.05806v1. https://arxiv.org/abs/2611.05806v1

**BibTeX**

```
@misc{li2026when,
  title = {{When File Ingestion Misleads Language Models: Measuring and Mitigating Divergences in Office Documents}},
  author = {Penghui Li},
  year = {2026},
  eprint = {2611.05806},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.05806v1}
}
```

## Related papers

- [Feeling Easier, Working Harder: Cognitive Load in AI-Assisted Code Comprehension](https://refivu.com/en/papers/e8b650a9-d757-41c0-965d-d7085453a0cd-feeling-easier-working-harder-cognitive-load-in-ai.md)
- [Gemini: A Family of Highly Capable Multimodal Models](https://refivu.com/en/papers/210f7673-6e80-4763-9ef2-d58f1a878648-gemini-a-family-of-highly-capable-multimodal-models.md)
- [A Survey on Evaluation of Large Language Models](https://refivu.com/en/papers/46dfd405-ef56-4804-b283-8d9be353baaf-a-survey-on-evaluation-of-large-language-models.md)
- [Beyond Instruction Override: Benchmarking Indirect Prompt Injection with Task-Tampering Attacks](https://refivu.com/en/papers/cefe818d-f868-4fcb-934d-a801e01c1bf8-beyond-instruction-override-benchmarking-indirect-prompt.md)
- [CapLite: Prompt-Injection Defense for Small Language Model Agents without Model-Written Security Artifacts](https://refivu.com/en/papers/960c67c8-5daf-4bf3-b6e9-64d4b7a65f38-caplite-prompt-injection-defense-for-small-language-model.md)
- [OpenAI GPT-5 System Card](https://refivu.com/en/papers/678bc558-0d7f-4ee8-9fa0-55c5eb2daf22-openai-gpt-5-system-card.md)

## Other paper commentary

- [SafeStart: Mitigating the Overlooked Safety Cost of Active Expert Reduction in MoE LLM Serving](https://refivu.com/en/papers/b8bbdd65-c9bf-432e-ac8f-8b9a8ec83109-safestart-mitigating-the-overlooked-safety-cost-of-active.md)
- [Does Your Trial Simulator Know What the Drug Does? An Intervention-Blind Test of Interventional Validity on 7,207 Registered Trials](https://refivu.com/en/papers/fe6c3d24-f962-4854-9971-52338808b6e1-does-your-trial-simulator-know-what-the-drug.md)
- [CompressionBench: How can your coding agents compress LLMs?](https://refivu.com/en/papers/943d8a97-633d-4d07-9efd-15168ede4d74-compressionbench-how-can-your-coding-agents-compress-llms.md)
- [ServerBench: How can your coding agents design specialized LLM serving systems?](https://refivu.com/en/papers/08bfcdf2-e2ef-4a8a-a94e-0ae43f956fef-serverbench-how-can-your-coding-agents-design-specialized.md)
- [InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuning](https://refivu.com/en/papers/a16f8bfe-f6f1-4e2b-a409-c76d2ed97fc3-instructblip-towards-general-purpose-vision-language-models.md)
- [Benchmarking Large Language Models for News Summarization](https://refivu.com/en/papers/403ef5da-5a1a-4165-8e2b-85961d56009c-benchmarking-large-language-models-for-news-summarization.md)
- [Ab Initio Accuracy Beyond the Cutoff: Distributed Message-Passing Equivariant Attention at Tens-of-Millions-of-Atom Scale](https://refivu.com/en/papers/c2adffa7-3974-4079-a249-b98e8e49c0f5-ab-initio-accuracy-beyond-the-cutoff-distributed-message.md)
- [Who Pays for the Knowledge Models Copy? Model Collapse as Rogers' Paradox](https://refivu.com/en/papers/c2788350-95e4-49ea-b02e-7eda6b301772-who-pays-for-the-knowledge-models-copy-model.md)
- [One Scale, Four Texts: Gaps, Overlaps and Silent Repairs in Published Grading Schemes](https://refivu.com/en/papers/7382b199-bae9-4bd2-bc8a-099292ab3de8-one-scale-four-texts-gaps-overlaps-and-silent.md)
- [Readable Is Not Steerable: Pre-Registered Tests of Physical Structure in Learned Fluid Representations](https://refivu.com/en/papers/6a096c38-7bfe-4099-b28b-62792fc82060-readable-is-not-steerable-pre-registered-tests-of.md)
- [Grounded but Not Immune: Confirmation Bias in Agent-as-a-judge](https://refivu.com/en/papers/44ed72e6-4047-45ec-8c1c-09e302868a29-grounded-but-not-immune-confirmation-bias-in-agent.md)
- [cuRoboV2-Fast: Fast Torque-Limited Collision-Free Motion Planning](https://refivu.com/en/papers/0d91c766-4d24-4f97-8fa1-9e5b24f3e4fd-curobov2-fast-fast-torque-limited-collision-free-motion.md)

## Terms in this paper

- [Claude Code](https://refivu.com/en/terms/140ee6d8eb01-claude-code)
- [ChatGPT](https://refivu.com/en/terms/96047648490a-chatgpt)
- [Summarization](https://refivu.com/en/terms/1e45700d5a1c-summarization)
- [Gemini](https://refivu.com/en/terms/a0fdd9dcf64f-gemini)
- [canary](https://refivu.com/en/terms/7b56c3fdb3fe-canary)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/69840035-4f93-450d-8f5f-605bdde7d86f-when-file-ingestion-misleads-language-models-measuring-and)
