TL;DR
Large Language Models (LLMs) don't "see" Office documents the way humans do; they rely on text extractors that often misinterpret the underlying XML structure. This paper identifies "extraction divergence"—a new attack surface where adversaries can manipulate files so that a human sees one thing while an LLM sees another, successfully misleading every major AI assistant tested (including ChatGPT, Claude, and Gemini) without needing a single line of malicious prompt injection.
What Problem Does This Paper Address?
When you upload a Word, Excel, or PowerPoint file to an AI, the system rarely "looks" at a rendered image of the page. Instead, it uses a text extractor to pull data from the document’s underlying Office Open XML (OOXML) files—a complex format where content is spread across multiple XML parts inside a ZIP archive.
The problem is that these extractors are often inconsistent. They might read "hidden" text that a human can't see, ignore display formatting that changes a number's value, or scramble the reading order of text boxes. This gap between the human view (what Office apps render) and the model view (what the extractor provides) creates a "parser differential" that attackers can exploit to feed LLMs misinformation while appearing perfectly benign to human reviewers.
Methods
The authors conducted a multi-stage study to map and mitigate these risks:
- Hybrid Program Analysis: They combined static analysis (modeling how libraries map XML elements to objects) with dynamic analysis (placing "canary" strings in various XML locations) to test 10 popular open-source extractors like
markitdownandpython-docx. - Attack Construction: Based on identified divergences, they built five attack scenarios:
- Hidden Injection: Placing text in invisible channels (e.g., image alt-text or vanished runs).
- Silent Omission: Putting critical info in footers or headers that extractors skip.
- Formatting Divergence: Using Excel's custom number formats to scale values (e.g., storing 1,000,000 but displaying $1,000).
- Spatial Order Inversion: Reordering text boxes on a slide so the extractor reads them in a different sequence.
- Sub-word Regrouping: Combining hidden and visible text to change word meanings (e.g., hidden "un" + visible "authorized").
- Defense (Prism): They developed a lightweight tool that reconstructs the human view by strictly following the OOXML specification for visibility and formatting, only falling back to an expensive "render oracle" (using vision-language models) for ambiguous layout cases.
Datasets
- Prevalence Study: The authors analyzed 2,229 real-world Office files harvested from the
govdocs1corpus and national open-data portals to see how often "attack-enabling" features (like hidden rows or scaling formats) occur naturally. - Evaluation Suite: They created a benchmark of 5 attack scenarios and 28 additional attack payloads to test against 8 LLM systems.
Key Insights and Ideas
- Attacks without Instructions: Unlike "prompt injection," these attacks require no malicious commands. The LLM is misled simply because it is given a different version of reality than the human user.
- The Cost of Extraction: Text extraction is roughly 100x cheaper than rendering a document for a Vision-Language Model (VLM). This economic pressure ensures that vulnerable text-based ingestion remains the industry standard.
- Benign Features as Weapons: The features exploited (like Excel's number scaling) are common in legitimate documents. For instance, 7% of spreadsheets in the wild use value-altering number formats. This makes detection via simple structural flags nearly impossible without causing massive false positives.
Key Results
- Widespread Vulnerability: Every one of the 8 tested systems (4 chat assistants and 4 coding agents) was misled by at least one attack. The overall success rate for attacks across all systems was 64%.
- Gemini's Failure: Google's Gemini was misled in 100% of the trials across all five attack scenarios.
- Formatting is the Weakest Link: The "Formatting Divergence" attack (changing numbers via Excel styles) was the most effective, misleading 7 out of 8 systems in at least 90% of trials.
- Prism's Effectiveness: The proposed defense, Prism, mitigated every attack scenario and all 28 additional payloads, correctly reconstructing the human view in 0.5ms per document—far faster than the extractors it replaces.
Limitations and Future Work
- Non-Exhaustive Measurement: The study focused on 10 extractors; proprietary pipelines in commercial LLMs might have other, undocumented divergences.
- Vision-Language Model (VLM) Costs: While Prism's "render oracle" is accurate, it is slow (~12s per document) and relies on commercial VLMs, which are themselves black boxes.
- Scope: The study did not cover legacy binary formats (like .doc or .xls) or other packaged formats like OpenDocument, though the authors suggest their methodology would apply there as well. Future work is needed to address "visual" attacks, such as text that is technically visible but too small for a human to read.
Summary updated