Introducing the Generative Application Firewall (GAF)
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "Introducing the Generative Application Firewall (GAF)".
Title and authors: Elias: Let’s look at why they think this is necessary, starting with the title and authors of "Introducing the Generative Application Firewall (GAF)."
Nadia: The authors are Joan Vendrell Farreny, Martí Jordà Roca, Miquel Cornudella Gaya, Rodrigo Fernández Baón, Victor García Martínez, Eduard Camacho Sucarrats, Alessandro Pignati. They’re bringing together expertise from security and AI research.
Priya: I’m interested in the title itself because it suggests a shift from just adding filters to building an actual firewall for these systems.
Elias: It does imply that we need something more holistic than just looking at individual prompts or data masking; it’s about creating a coherent perimeter.
Nadia: What this paper really boils down to is that generative AI attacks exploit weaknesses in layered security models because they embed themselves within things that look perfectly normal to network defenses.
The paper's summary: Nadia: So, the core idea of "Introducing the Generative Application Firewall (GAF)" is that it acts like a WAF does for web traffic, but for generative systems and autonomous agents too.
Elias: It aims to unify prompt filters and guardrails into one enforcement point, which means it coordinates defenses across all those different layers of the generative application stack.
Priya: The summary mentions that GAF goes beyond just user-to-LLM prompts; it also mediates how autonomous agents make tool calls and filters what those tools output to stop indirect attacks.
Nadia: That’s key because it handles indirect jailbreaks, where a user might ask the AI to "roleplay as a compliance auditor" and then try to get detailed steps for something dangerous through that roleplay.
Elias: The paper stresses that GAF maintains a holistic view of the application over time, looking at users, sessions, and interactions sequentially rather than just single inputs.
The paper's improvements: Nadia: Now let’s talk about what the authors suggest are the actual enhancements they’re proposing with this GAF framework.
Elias: They build it on a defense-in-depth principle, defining five specific security layers that target different types of threats, moving beyond just input filtering.
Priya: I saw them list five layers: Network, Access, Syntactic, Semantic, and Context; the idea is that you need all of these working together for solid protection.
Nadia: The network layer handles basic stuff like rate limiting and blocking bad IP addresses at the start of everything we do.
Elias: But the real focus is on the Semantic layer, which they say is responsible for detecting and stopping attacks that exploit the actual meaning or context of natural language interactions.
Conclusion: Nadia: To wrap up, this paper introduces GAF as a new architectural layer that unifies fragmented defenses into one place to secure LLM applications.
Elias: It moves the defense strategy from just checking individual inputs to maintaining a continuous view of the entire interaction, covering users, sessions, and agent actions over time.
Priya: From what I’ve read, it seems like the goal is to provide a standardized way to assess security across these five layers using a five-star rating system.
Nadia: The implication for us is that if we want robust security for these applications, we can't rely on just one filter; we need this coordinated approach described in "Introducing the Generative Application Firewall (GAF)."
University of the Aegean · University of Cambridge · OWASP GenAI Security Project · University of Liverpool · MIT Computer Science and Artificial Intelligence Laboratory · Center for AI and Digital Policy Center for AI and Digital Policy Company for Huawei · Cloud Security Alliance
cs.CR, cs.AI
Submitted: 2026-01-22
Updated: 2026-12-01
Comments: Funded by the EU, grant 101247606
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 100/100
The gist: The paper introduces the Generative Application Firewall (GAF), a new architectural layer designed to unify fragmented defenses for LLM applications into a single enforcement…
Key concepts
- Semantic Gap
- This gap exists because current defenses only look at technical vulnerabilities (syntax). Generative AI attacks exploit the meaning and context of natural language rather than simple code errors. GAF's Semantic Layer is introduced to bridge this by interpreting natural language instructions into machine-actionable representations.
- GAF Security Layers
- GAF uses a defense-in-depth approach with five layers: Network (rate limiting), Access (authentication), Syntactic (structure checking), Semantic (meaning detection), and Context (session history). These layers work together to provide comprehensive protection against various attack vectors in the generative AI stack.
- OSI Model Extension
- The paper proposes extending the OSI model by adding a new Layer 8. This layer handles the interpretation of semantic content, transforming unstructured text or natural language instructions into formats that a machine can actually act upon, bridging the gap between human language and system execution.
Terminology
Summary
The paper introduces the Generative Application Firewall (GAF), a new architectural layer designed to unify fragmented defenses for LLM applications into a single enforcement point. p. 0 Introducing the Generative Application Firewall (GAF)
Joan Vendrell FarrenyNeuralTrust
Martí Jordà Roca NeuralTrust
Miquel Cornudella Gaya NeuralTrust
Rodrigo Fernández Baón NeuralTrust
Victor García MartínezNeuralTrust
Eduard Camacho Sucarrats NeuralTrust
Alessandro Pignati NeuralTrust
Expert endorsers:
Christos Kalyvas-Kasopatidis∗ University of the Aegean
Emre Isik∗ University of Cambridge
Idan Habler∗ OWASP GenAI Security Project
Jinwei Hu∗ University of Liverpool
Strahinja Janjusevic∗ MIT Computer Science and Artificial Intelligence Laboratory
Osvaldo Ramirez∗ Center for AI and Digital Policy
Tu Nguyen∗ Huawei
Xuanlin Liu∗ Cloud Security Alliance
Abstract
This paper introduces the Generative Application Firewall (GAF), a new architectural layer
for securing LLM applications. Existing defenses—prompt filters, guardrails, and datamasking—remain fragmented; GAF unifies them into a single enforcement point, much like
a WAF coordinates defenses for web traffic, while also covering autonomous agents and their
tool interactions. Introducing the Generative Application Firewall (GAF)
Joan Vendrell FarrenyNeuralTrust
Martí Jordà Roca NeuralTrust
Miquel Cornudella Gaya NeuralTrust
Rodrigo Fernández Baón NeuralTrust
Victor García MartínezNeuralTrust
Eduard Camacho Sucarrats NeuralTrust
Alessandro Pignati NeuralTrust
Expert endorsers:
Christos Kalyvas-Kasopatidis∗ University of the Aegean
Emre Isik∗ University of Cambridge
Idan Habler∗ OWASP GenAI Security Project
Jinwei Hu∗ University of Liverpool
Strahinja Janjusevic∗ MIT Computer Science and Artificial Intelligence Laboratory
Osvaldo Ramirez∗ Center for AI and Digital Policy
Tu Nguyen∗ Huawei
Xuanlin Liu∗ Cloud Security Alliance
Abstract
This paper introduces the Generative Application Firewall (GAF), a new architectural layer
for securing LLM applications. Existing defenses—prompt filters, guardrails, and datamasking—remain fragmented; GAF unifies them into a single enforcement point, much like
a WAF coordinates defenses for web traffic, while also covering autonomous agents and their
tool interactions. Introducing the Generative Application Firewall (GAF)
Joan Vendrell FarrenyNeuralTrust
Martí Jordà Roca NeuralTrust
Miquel Cornudella Gaya NeuralTrust
Rodrigo Fernández Baón NeuralTrust
Victor García MartínezNeuralTrust
Eduard Camacho Sucarrats NeuralTrust
Alessandro Pignati NeuralTrust
Expert endorsers:
Christos Kalyvas-Kasopatidis∗ University of the Aegean
Emre Isik∗ University of Cambridge
Idan Habler∗ OWASP GenAI Security Project
Jinwei Hu∗ University of Liverpool
Strahinja Janjusevic∗ MIT Computer Science and Artificial Intelligence Laboratory
Osvaldo Ramirez∗ Center for AI and Digital Policy
Tu Nguyen∗ Huawei
Xuanlin Liu∗ Cloud Security Alliance
Abstract
This paper introduces the Generative Application Firewall (GAF), a new architectural layer
for securing LLM applications. Existing defenses—prompt filters, guardrails, and datamasking—remain fragmented; GAF unifies them into a single enforcement point, much like
a WAF coordinates defenses for web traffic, while also covering autonomous agents and their
tool interactions.Where the paper says it
Where the paper says it
Where the paper says it
Necessity of the Dedicated Layer
Generative AI attacks exploit limitations in traditional layered security models, necessitating a dedicated security layer to protect applications.<ref:2601.15824#pg2, Generative AI attacks exploit limitations in traditional layered security models, requiring a dedicated security layer to protect applications>. p. 1 2 Why is it necessary? Generative AI attacks exploit limitations in traditional layered security models, requiring a dedicated security
layer to protect applications. Bypassing Network-Layer Security (Layer 3-4): Traditional network firewalls and intrusion detection
systems examine packet headers, IP addresses, and basic protocol information at the network and transport
layers. However, jailbreak and prompt injection attacks embed within semantically valid HTTP requests
that appear legitimate at the network level. Bypassing Network-Layer Security (Layer 3-4): Traditional network firewalls and intrusion detection
systems examine packet headers, IP addresses, and basic protocol information at the network and transport
layers. However, jailbreak and prompt injection attacks embed within semantically valid HTTP requests
that appear legitimate at the network level. Evading Web Application Firewalls (Layer 4-7): Traditional WAFs inspect HTTP headers, request
structures, and known attack signatures to detect threats like SQL injection or cross-site scripting. However,
generative AI attacks exploit natural language semantics rather than syntactic vulnerabilities. Evading Web Application Firewalls (Layer 4-7): Traditional WAFs inspect HTTP headers, request
structures, and known attack signatures to detect threats like SQL injection or cross-site scripting. However,
generative AI attacks exploit natural language semantics rather than syntactic vulnerabilities. The attack
lies in conversational manipulation of the AI model. The Semantic Gap: Prompt injection and jailbreak attacks operate at the semantic layer, exploiting
natural language meaning and context rather than technical vulnerabilities.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
GAF Security Layers
The Generative Application Firewall is built upon a defense-in-depth principle, defining five interdependent security layers.<ref:2601.15824#pg3, This framework defines security layers for GAF, each targeting specific threats and extending traditional models into the generative AI domain>. p. 2 Each layer addresses a distinct class of risks, and only in combination do they provide comprehensive
coverage. This framework defines security layers for GAF, each targeting specific threats and extending traditional
models into the generative AI domain:
1.Where the paper says it
-
Network Layer: Enforces request and prompt rate limits, blocks abusive IPs, and restricts traffic. p. 2
<ref:2601.15824#pg4>.Where the paper says it
Network Layer. Network-level protection enforces request and prompt rate limits, blocks abusive IPs, and restricts traffic.
-
Access Layer: Ensures users are authenticated, authorized, and assigned appropriate roles. p. 3
<ref:2601.15824#pg4, Access-level protection ensures users are authenticated, authorized, and assigned appropriate roles>. p. 3Where the paper says it
Access Layer. Access-level protection ensures users are authenticated, authorized, and assigned appropriate roles.
Where the paper says it
Access Layer. Access-level protection ensures users are authenticated, authorized, and assigned appropriate roles.
-
Syntactic Layer: Inspects the structure of inputs and outputs to catch escape sequences and code injections. p. 3
<ref:2601.15824#pg4, The syntactic layer inspects the structure of inputs and outputs to catch escape sequences, obfuscated tokens, and code injections that could impact downstream components such as databases, interpreters, or execution environments>. p. 3Where the paper says it
Syntactic Layer. The syntactic layer inspects the structure of inputs and outputs to catch escape sequences, obfuscated tokens, and code injections that could impact downstream components such as databases, interpreters, or execution environments.
Where the paper says it
Syntactic Layer. The syntactic layer inspects the structure of inputs and outputs to catch escape sequences, obfuscated tokens, and code injections that could impact downstream components such as databases, interpreters, or execution environments.
-
Semantic Layer: Detects and prevents semantic attacks exploiting the meaning and context of natural language interactions. p. 1
<ref:2601.15824#pg4, This layer is responsible for detecting and preventing semantic attacks that exploit the meaning and context of natural language interactions>. p. 3Where the paper says it
The attack lies in conversational manipulation of the AI model. The Semantic Gap: Prompt injection and jailbreak attacks operate at the semantic layer, exploiting natural language meaning and context rather than technical vulnerabilities.
Where the paper says it
Semantic Layer. This layer is responsible for detecting and preventing semantic attacks that exploit the meaning and context of natural language interactions.
-
Context Layer: Addresses adversarial multi-turn jailbreaks by maintaining session history and role awareness. p. 3
<ref:2601.15824#pg4, Context-level protection addresses adversarial multi-turn jailbreaks by maintaining session history and role awareness>. p. 3Where the paper says it
Context-level protection addresses adversarial multi-turn jailbreaks that evolve across a dialogue. By maintaining session history and role awareness, it detects strategies such as Echo Chamber Alobaid et al.
Where the paper says it
Context-level protection addresses adversarial multi-turn jailbreaks that evolve across a dialogue. By maintaining session history and role awareness, it detects strategies such as Echo Chamber Alobaid et al.
OSI Model Extension
The paper proposes extending the OSI reference model to capture the probabilistic nature of natural language interpretation.<ref:2601.15824#pg5>. This extension introduces a Semantic Layer (Layer 8) as a non-normative layer above the application layer. p. 3 , prompt injection, semantic poisoning, multi-turn
exploitation). To capture this phenomenon while preserving OSI discipline, we propose a Semantic Layer
(Layer 8) as a non-normative extension above the application layer; PDUs for Layers 5-8 remain "Data,"
4 , agent-to-agent or toolcalling over streams) still traverse application protocols but depend on shared semantics and intent; placing
semantics above L7 reflects that failures stem from meaning rather than syntax, echoing language-based
information flow control ideas Sabelfeld & Myers (2003). The proposed L8 layer function is the interpretation and transformation of semantic content (naturallanguage instructions and unstructured text) into machine-actionable representations and outputs; probabilistic inference conditioned on conversational context and knowledge; mediation between language semantics and application/service interfaces. , agent-to-agent or toolcalling over streams) still traverse application protocols but depend on shared semantics and intent; placing
semantics above L7 reflects that failures stem from meaning rather than syntax, echoing language-based
information flow control ideas Sabelfeld & Myers (2003). The proposed L8 layer function is the interpretation and transformation of semantic content (naturallanguage instructions and unstructured text) into machine-actionable representations and outputs; probabilistic inference conditioned on conversational context and knowledge; mediation between language semantics and application/service interfaces.Where the paper says it
Where the paper says it
Where the paper says it
Operational Enforcement Loop
GAF must balance safety enforcement with user experience through a four-phase inline loop.<ref:2601.15824#pg7, To keep GAF performant, we define a four-phase inline loop (Admission, Generation, Intervention, Post-action)>:
-
Admission: Evaluates identity/session and enforces tool-call allow/deny scopes. p. 6
<ref:2601.15824#pg7, 1. Admission: evaluate identity/session, rate limits, and basic syntactic guards before invoking the model or tools, and enforce tool-call allow/deny and scopes>. p. 6Where the paper says it
To keep GAF performant, we define a four-phase inline loop (Admission, Generation, Intervention, Post-action): 1. Admission: evaluate identity/session, rate limits, and basic syntactic guards before invoking the model or tools, and enforce tool-call allow/deny and scopes.
Where the paper says it
To keep GAF performant, we define a four-phase inline loop (Admission, Generation, Intervention, Post-action): 1. Admission: evaluate identity/session, rate limits, and basic syntactic guards before invoking the model or tools, and enforce tool-call allow/deny and scopes.
-
Generation: Forwards allowed requests with streaming hooks while monitoring token-level signals. p. 6
<ref:2601.15824#pg7, 2. Generation: forward allowed requests with streaming hooks; accumulate token-level signals; monitor tool output streams>. p. 6Where the paper says it
Admission: evaluate identity/session, rate limits, and basic syntactic guards before invoking the model or tools, and enforce tool-call allow/deny and scopes. Generation: forward allowed requests with streaming hooks; accumulate token-level signals; monitor tool output streams.
Where the paper says it
Admission: evaluate identity/session, rate limits, and basic syntactic guards before invoking the model or tools, and enforce tool-call allow/deny and scopes. Generation: forward allowed requests with streaming hooks; accumulate token-level signals; monitor tool output streams.
-
Intervention: Triggers selective redaction or stream termination upon policy triggers. p. 7
<ref:2601.15824#pg7>.Where the paper says it
Intervention: on policy triggers, selectively redact tokens or tool outputs, redirect to safe fallbacks, or terminate the stream with a well-formed close. Post-action: emit structured logs/metrics and update longitudinal state for future turns, and record agent/tool-call telemetry for longitudinal analysis.
-
Post-action: Emits structured logs and updates longitudinal state for future turns. p. 7
<ref:2601.15824#pg7>.Where the paper says it
Intervention: on policy triggers, selectively redact tokens or tool outputs, redirect to safe fallbacks, or terminate the stream with a well-formed close. Post-action: emit structured logs/metrics and update longitudinal state for future turns, and record agent/tool-call telemetry for longitudinal analysis.
GAF Rating System
A 5-star rating system is introduced to standardize GenAI security assessment based on the five defined layers.<ref:2601.15824#pg8, this framework introduces a 5-star rating system for GAF implementations>. p. 7 Maintain explicit SLOs for latency, error rates, and falsepositive/negative rates, and validate them continuously with red-team evaluation suites and replay traffic;
use these signals to tune policies and detect regressions. 8 GAF Rating System
Inspired by Tim Berners-Lee’s 5-star Open Data,1
this framework introduces a 5-star rating system for GAF
implementations. The rating directly corresponds to the five security layers defined in Section 3. 2: each star
represents full coverage of one layer, progressing from foundational network controls (1 star) through access,
syntactic, and semantic layers, up to comprehensive context-aware protection (5 stars). Semantic Layer Context independent GenAI attacks
like DAN, DEV mode, Best-of-N jailbreak. Context Layer Context dependent attacks like
Crescendo attacks, Echo Chamber
techniques, multi-turn jailbreaks. 2: each star
represents full coverage of one layer, progressing from foundational network controls (1 star) through access,
syntactic, and semantic layers, up to comprehensive context-aware protection (5 stars). This cumulative
structure reflects the defense-in-depth principle—higher ratings require all lower-layer protections to be in
place.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
**GAF vs.
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Continuous context monitoring allows for detection of adversarial multi-turn jailbreaks by
maintaining session history and role awareness
to detect strategies such asEcho Chamber Alobaid et al. (2025) and Crescendo Russinovich et al. (2024), where malicious instructions are incrementally introduced to bypass guardrails.
-
Implement real-time stream termination by utilizing the Context Layer for
detect[ing] escalation strategies or context-dependent violations that only emerge over time,
ensuringdeterministic termination and well-formed HTTP/WebSocket framing
during Generation and Intervention phases. -
Enhance fine-grained control by supporting
selective token redaction over full blocking when safe
to enforce policy in real time without degrading the user experience, allowing for controls likeRedirect (soft guardrail) and Alert for fine-grained, context-aware enforcement.
-
Establish a maturity path via a 5-star rating system that mandates full coverage across all five layers—Network, Access, Syntactic, Semantic, and Context—ensuring that higher ratings require
all lower-layer protections to be in place.
-
Integrate an LLM or specialized model within the Context Layer to analyze conversation history and model function for
deep understanding of conversational history and model use cases
necessary for detecting context-dependent threats.
Abstract
This paper introduces the Generative Application Firewall (GAF), a new architectural layer for securing LLM applications. Existing defenses -- prompt filters, guardrails, and data-masking -- remain fragmented; GAF unifies them into a single enforcement point, much like a WAF coordinates defenses for web traffic, while also covering autonomous agents and their tool interactions.
Sources
- Current state of LLM Risks and AI Guardrails
- An Exploratory Study on the Engineering of Security Features
- Best-of-N Jailbreaking
- Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations
- What Features in Prompts Jailbreak LLMs? Investigating the Mechanisms Behind Attacks
- Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMs
- Great, Now Write an Article About That: The Crescendo Multi-Turn LLM Jailbreak Attack
Related papers
- RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities
- Opal: Private Memory for Personal AI
- Fuel as Identity: Authenticating Inter-Satellite Laser Links after Total Key Compromise
- Merkle Trees Minimize Verifier Complexity in the ROM
- VulCPE: Context-Aware Cybersecurity Vulnerability Retrieval and Management
- Node Differential Privacy via Node-Stable Graph Projections