Response Attack: Exploiting Contextual Priming to Jailbreak Large Language Models

Ziqi Miao, Lijun Li, Yuan Xiong, Zhenhua Liu, Pengyu Zhu +1 more
7/7/2025
cs.CL

Official code: Dtc7w3PQ/Response-Attack (39 stars, last commit 2026-03-22).

Abstract

Contextual priming, where earlier stimuli covertly bias later judgments, offers an unexplored attack surface for large language models (LLMs). We uncover a contextual priming vulnerability in which the previous response in the dialogue can steer its subsequent behavior toward policy-violating content. While existing jailbreak attacks largely rely on single-turn or multi-turn prompt manipulations, or inject static in-context examples, these methods suffer from limited effectiveness, inefficiency, or semantic drift. We introduce Response Attack (RA), a novel framework that strategically leverages intermediate, mildly harmful responses as contextual primers within a dialogue. By reformulating harmful queries and injecting these intermediate responses before issuing a targeted trigger prompt, RA exploits a previously overlooked vulnerability in LLMs. Extensive experiments across eight state-of-the-art LLMs show that RA consistently achieves significantly higher attack success rates than nine leading jailbreak baselines. Our results demonstrate that the success of RA is directly attributable to the strategic use of intermediate responses, which induce models to generate more explicit and relevant harmful content while maintaining stealth, efficiency, and fidelity to the original query. The code and data are available at https://github.com/Dtc7w3PQ/Response-Attack.

View on arXivView PDF

Code Implementations(1)

Official implementation of “Response Attack: Exploiting Contextual Priming to Jailbreak Large Language Models” (AAAI 2026).

393Shell, PythonJul 5, 20257 months ago

Similar Papers

Cite this paper

@article{miao2025response,
  title  = {Response Attack: Exploiting Contextual Priming to Jailbreak Large Language Models},
  author = {Ziqi Miao and Lijun Li and Yuan Xiong and Zhenhua Liu and Pengyu Zhu and Jing Shao},
  year   = {2025},
  eprint = {2507.05248},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.05248v2}
}

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/2507.05248.svg)](https://codeofpaper.com/paper/2507.05248)

Discussion