Saved in:
Bibliographic Details
Main Authors: Yao, Hongwei, Xia, Yun, Shao, Shuo, Shi, Haoran, Qiao, Tong, Wang, Cong
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2511.04215
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909889982365696
author Yao, Hongwei
Xia, Yun
Shao, Shuo
Shi, Haoran
Qiao, Tong
Wang, Cong
author_facet Yao, Hongwei
Xia, Yun
Shao, Shuo
Shi, Haoran
Qiao, Tong
Wang, Cong
contents Large language models (LLMs) increasingly employ guardrails to enforce ethical, legal, and application-specific constraints on their outputs. While effective at mitigating harmful responses, these guardrails introduce a new class of vulnerabilities by exposing observable decision patterns. In this work, we present the first study of black-box LLM guardrail reverse-engineering attacks. We propose Guardrail Reverse-engineering Attack (GRA), a reinforcement learning-based framework that leverages genetic algorithm-driven data augmentation to approximate the decision-making policy of victim guardrails. By iteratively collecting input-output pairs, prioritizing divergence cases, and applying targeted mutations and crossovers, our method incrementally converges toward a high-fidelity surrogate of the victim guardrail. We evaluate GRA on three widely deployed commercial systems, namely ChatGPT, DeepSeek, and Qwen3, and demonstrate that it achieves an rule matching rate exceeding 0.92 while requiring less than $85 in API costs. These findings underscore the practical feasibility of guardrail extraction and highlight significant security risks for current LLM safety mechanisms. Our findings expose critical vulnerabilities in current guardrail designs and highlight the urgent need for more robust defense mechanisms in LLM deployment.
format Preprint
id arxiv_https___arxiv_org_abs_2511_04215
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Black-Box Guardrail Reverse-engineering Attack
Yao, Hongwei
Xia, Yun
Shao, Shuo
Shi, Haoran
Qiao, Tong
Wang, Cong
Cryptography and Security
Computation and Language
Large language models (LLMs) increasingly employ guardrails to enforce ethical, legal, and application-specific constraints on their outputs. While effective at mitigating harmful responses, these guardrails introduce a new class of vulnerabilities by exposing observable decision patterns. In this work, we present the first study of black-box LLM guardrail reverse-engineering attacks. We propose Guardrail Reverse-engineering Attack (GRA), a reinforcement learning-based framework that leverages genetic algorithm-driven data augmentation to approximate the decision-making policy of victim guardrails. By iteratively collecting input-output pairs, prioritizing divergence cases, and applying targeted mutations and crossovers, our method incrementally converges toward a high-fidelity surrogate of the victim guardrail. We evaluate GRA on three widely deployed commercial systems, namely ChatGPT, DeepSeek, and Qwen3, and demonstrate that it achieves an rule matching rate exceeding 0.92 while requiring less than $85 in API costs. These findings underscore the practical feasibility of guardrail extraction and highlight significant security risks for current LLM safety mechanisms. Our findings expose critical vulnerabilities in current guardrail designs and highlight the urgent need for more robust defense mechanisms in LLM deployment.
title Black-Box Guardrail Reverse-engineering Attack
topic Cryptography and Security
Computation and Language
url https://arxiv.org/abs/2511.04215