Injecting Falsehoods: Adversarial Man-in-the-Middle Attacks Undermining Factual Recall in LLMs

Alina Fastowski, Bardh Prenkaj, Yuxiao Li, Gjergji Kasneci
11/8/2025
cs.CRcs.AIcs.CL

No official code found. Best implementation: afastowski/llm_attack (4 stars, last commit 2026-01-09).

Abstract

LLMs are now an integral part of information retrieval. As such, their role as question answering chatbots raises significant concerns due to their shown vulnerability to adversarial man-in-the-middle (MitM) attacks. Here, we propose the first principled attack evaluation on LLM factual memory under prompt injection via Xmera, our novel, theory-grounded MitM framework. By perturbing the input given to "victim" LLMs in three closed-book and fact-based QA settings, we undermine the correctness of the responses and assess the uncertainty of their generation process. Surprisingly, trivial instruction-based attacks report the highest success rate (up to ~85.3%) while simultaneously having a high uncertainty for incorrectly answered questions. To provide a simple defense mechanism against Xmera, we train Random Forest classifiers on the response uncertainty levels to distinguish between attacked and unattacked queries (average AUC of up to ~96%). We believe that signaling users to be cautious about the answers they receive from black-box and potentially corrupt LLMs is a first checkpoint toward user cyberspace safety.

View on arXivView PDF

Code Implementations(1)

Code for the paper "Injecting Falsehoods: Adversarial Man-in-the-Middle Attacks Undermining Factual Recall in LLMs"

40Shell, PythonNov 5, 20249 months ago

Cite this paper

@article{fastowski2025injecting,
  title  = {Injecting Falsehoods: Adversarial Man-in-the-Middle Attacks Undermining Factual Recall in LLMs},
  author = {Alina Fastowski and Bardh Prenkaj and Yuxiao Li and Gjergji Kasneci},
  year   = {2025},
  eprint = {2511.05919},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.05919v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.05919.svg)](https://codeofpaper.com/paper/2511.05919)

Discussion