The Risks of Stacking LLM Response Safeguards: When Quality Gates Undermine Security Gates
Preprint. Not peer reviewed. Services built around large language models (LLMs) combine safeguards, elevating the performance of generated responses. However, standalone safeguards can conflict while interacting in the pipeline, compromising the reliability and security of the whole system. This study explores such an interaction in a chat assistant designed to perform root-cause analysis on simulated cellular networks. The system employs two sequential checks: (1) a leak gate that replaces response drafts containing confidential details with refusal texts, and (2) a quality gate that verifies responses against available evidence, requesting revisions when necessary. I found that the quality gate receives no indication when the leak gate blocks a draft, so it fails the refusal text, which triggers a replacement response that the leak gate never checks. This allows the quality gate to undo the leak gate's decision, and the replacement to potentially disclose confidential information. I investigated this behaviour by examining the system's architecture, a test of 30 chat turns, a re-check by the leak gate and assessments by two human raters. The leak gate blocked 17 (57%) drafted responses, while 22 final responses (73%) contained text that was never checked by it, and 1 out of 22 final responses was tagged as "forbidden" by the raters. Moreover, a subsequent rerun of the single forbidden response had it pass all the leak gate's verdicts. This study demonstrates how unintended interactions between independent safeguards can degrade their performance and potentially the system as a whole, necessitating proper design and tests to account for such interactions. Data and scripts: https://doi.org/10.5281/zenodo.24105950 Use of AI tools: The author used Claude (Anthropic; Claude Opus 5.5 and Claude Fable 5.1) as an assistant for coding, results analysis and drafting the text, and checked all content, for which he takes full responsibility. No reported grade, mark or count comes from an LLM, except the screening for causal claims (Appendix A) and the judges under study.
Authors
- Rafid Ul Karim (ORCID: https://orcid.org/0009-0000-8469-8060)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-12
- DOI
- https://doi.org/10.5281/zenodo.24154238
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- preprint