No Attack Required: Semantic Fuzzing for Specification Violations in Agent Skills

Ying Li, Hongbo Wen, Yanju Chen, Hanzhi Liu, Yuan TianarXiv 2026 · DOI

TL;DR

This paper introduces SEFZ, a novel semantic fuzzing framework that automatically discovers "specification violations" in AI agent skills. These violations occur when a skill's own safety rules are broken by normal user inputs, not due to external attacks, undermining user trust. SEFZ achieves this by translating natural language guardrails into formal reachability goals and using an LLM-powered fuzzer to find inputs that trigger these violations.

What Problem Does This Paper Address?

AI agents are increasingly empowered to perform actions on behalf of users by invoking "skills" – bundles of natural language instructions and executable scripts. To ensure safety, these skills declare natural language "guardrails" that specify constraints on their behavior. However, these guardrails can fail silently. This happens not because of malicious attacks, but due to the inherent ambiguity of natural language, mismatches between the specification and the actual implementation, or emergent behaviors when multiple operations are combined. These "specification violations" are hard to detect with traditional static analysis or prompt-injection defenses because they are semantic, triggered by benign inputs, and manifest only at runtime. This gap between what a skill says it will do and what it actually does erodes user trust.

Methods

SEFZ employs a goal-directed semantic fuzzing approach. Its core components are:

  1. Guardrail Decomposition: The natural language guardrails from a skill's specification are analyzed to extract "reachability goals." These goals formalize what a violation looks like as a forbidden path in an annotated execution trace.
  2. Semantic Mutation: An LLM-driven mutator generates new, benign user inputs (seeds) by semantically transforming existing ones. This process is guided by a Thompson Sampling bandit, which learns which mutation operators are most effective at approaching the violation goals.
  3. Sandboxed Executor: The generated inputs are executed within a sandboxed environment that mimics the agent's runtime. Every tool invocation, resource access, and confirmation prompt is recorded.
  4. Trace Recorder & Annotator: The execution is captured as an "annotated execution trace," a graph of events labeled with security predicates (e.g., tainted, sens, exec, ask).
  5. Oracle: This component checks if the annotated trace satisfies any of the reachability goals. If a violation is found, it's recorded as a "witness." The oracle also provides a "goal-proximity score" to guide the mutation process.

The entire process forms a closed loop: mutation generates inputs, execution produces traces, the oracle checks for violations and provides feedback, and the bandit uses this feedback to refine mutation strategies.

Datasets

The primary dataset used is a collection of 402 real-world agent skills sourced from the OpenClaw marketplace. These skills were filtered to ensure they involved safety constraints, state-modifying operations, and sensitive resources. The authors did not create a new benchmark dataset but rather curated and analyzed existing skills.

Key Insights and Ideas

  • Specification Violations are a Real Threat: The paper demonstrates that even well-intentioned skills can have critical security flaws due to the inherent challenges of translating natural language safety rules into deterministic code behavior.
  • Semantic Fuzzing is Key: Traditional fuzzing techniques are insufficient for this problem. SEFZ's semantic mutation and goal-directed approach are crucial for exploring the vast, unstructured input space of natural language requests.
  • Guardrails Need Operational Definitions: Natural language guardrails are often too ambiguous or lack concrete operational definitions, leading agents to make probabilistic, context-driven inferences that can be incorrect and unsafe.
  • Runtime Execution is Essential: Specification violations are fundamentally runtime phenomena. Static analysis of specifications or code alone cannot uncover these issues.
  • LLMs as Both Problem and Solution: LLMs are the source of ambiguity in guardrails but are also leveraged by SEFZ to generate semantically meaningful inputs and mutations, bridging the gap between specification and behavior.

Key Results

  • High Violation Rate: SEFZ discovered specification violations in 120 out of 402 skills (29.9%).
  • Zero-Day Discoveries: 26 previously unknown, security-relevant specification violations were found in deployed skills.
  • Efficiency: Fuzzing converges quickly, with 44% of violations found within the first 10 minutes and an average of 11 minutes per skill to find all violations.
  • Component Contributions: Ablation studies showed that semantic mutation, the Thompson Sampling bandit, and the feedback buffer each significantly contribute to SEFZ's effectiveness. Removing semantic mutation caused the largest drop in discovered violations.
  • Recurring Pitfalls: Six recurring specification pitfalls were identified, offering concrete guidance for safer skill design (e.g., modality mismatch, incomplete scope, undefined semantics).

Limitations and Future Work

  • LLM Non-Determinism: While mitigated by running inputs multiple times and merging traces, LLM non-determinism remains an internal threat.
  • Predicate Granularity: The fixed vocabulary of security predicates can lead to either false positives (too coarse) or false negatives (too fine). Future work could involve predicate refinement driven by oracle feedback.
  • Scope: The benchmark of 402 skills may not represent all skill architectures, and results might not generalize to purely structured-API skills.
  • Future Work: The authors suggest extending SEFZ to multi-skill compositions and pairing its witness generation with automated repair to synthesize missing safety gates.

Summary updated

BibTeX
@misc{li2026no,
  author = {Ying Li and Hongbo Wen and Yanju Chen and Hanzhi Liu and Yuan Tian and Yu Feng},
  title = {{No Attack Required: Semantic Fuzzing for Specification Violations in Agent Skills}},
  year = {2026},
  eprint = {2605.13044},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.13044},
}
Figure