potentialpaper

Black-Box Guardrail Reverse-engineering Attack

Hongwei Yao, Yun Xia, Shuo Shao, Haoran Shi, Tong Qiao, Cong Wang

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Large language models (LLMs) increasingly employ guardrails to enforce ethical, legal, and application-specific constraints on their outputs. While effective at mitigating harmful or undesirable responses, these guardrails introduce a new class of vulnerabilities by exposing observable decision patterns. In this work, we present GRA, the first black-box guardrail reverse-engineering attack. Without requiring access to internal configurations, GRA combines iterative querying, reinforcement learning, and genetic algorithm–based data augmentation to approximate the decision boundaries of target guardrails. By adaptively training a surrogate guardrail, our method achieves high-fidelity replication of the victim guardrail’s behavior. To systematically evaluate this attack, we construct a legal–moral question–answering dataset designed to measure rule-reversal performance. Extensive experiments across two benchmark datasets and three commercial LLM systems, including ChatGPT, DeepSeek, and Qwen, demonstrate that GRA achieves a rule-matching rate exceeding 0.92 while requiring less than $85 in API costs. Our findings expose critical vulnerabilities in current guardrail designs and highlight the urgent need for more robust defense mechanisms in LLM deployment.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…