TRANSMISSION // 2612.04641v1
Can Web Firewalls Keep Up With AI-Generated Attacks?
Source published
GenWebSec tests whether AI-generated firewall rules can block changing web attacks while staying compact and avoiding false alarms.

Web application firewalls rely on rules to spot threats such as SQL injection and cross-site scripting. But attackers can use large language models to produce new payloads quickly. GenWebSec pairs AI attack and defense agents in a testing loop, asking whether defenses can adapt without accumulating unwieldy rules or blocking legitimate traffic.
Web application firewalls (WAFs) inspect incoming web requests and block patterns associated with attacks. Their rules need maintenance as threats change. Large language models (LLMs) could make that challenge harder by helping attackers generate and revise exploit payloads quickly. GenWebSec, a new research framework, asks whether automated defenses can keep pace—and whether they can do so without piling up rules or disrupting ordinary requests.
A test-and-update loop
The authors built a closed loop in which an LLM-based attacker searches for SQL injection (SQLi) and cross-site scripting (XSS) payloads, while a defender proposes WAF rules. SQLi attempts to manipulate database queries; XSS seeks to inject scripts into web pages. Crucially, candidate payloads were checked by running them against live applications and replaying them through the firewall, rather than treating text that merely looked like an exploit as a confirmed attack.
The defender could write rules for individual payloads or group related payloads into broader rules. Admission was coverage-checked: a proposed rule had to block the relevant attacks, while staying within strict limits on false positives—legitimate requests incorrectly blocked. After the rules were updated, the attacker searched again, testing whether it could find new ways through.
The evaluation used six custom SQLi and XSS targets protected by ModSecurity with OWASP Core Rule Set (CRS) version 4.29.0. The authors also report tests involving other WAFs, different attack models, and two applications not used in the main target set.
What the tests found
On the six custom targets, the abstract reports that 78.0–99.6% of application-valid payloads bypassed the CRS. Every confirmed bypass also evaded Coraza and BunkerWeb when those systems used the same ruleset. This is a result for the tested targets and configuration, not a measure of how often real-world WAFs fail in general.
Grouping attacks into shared rules made the defenses much more compact in tests using matched, fixed attack corpora. Median rule counts fell from 93.5–297 with per-payload rules to 1–3 per page with grouped rules, while blocking 99.6–100% of the bypasses in those tests. These figures describe a controlled comparison on the same attack sets; they do not establish that every attack family can be compressed this way.
The iterative tests added a harder challenge: after each update, the attacker searched again. It found post-update bypasses in 19 of 60 runs. Even so, the abstract reports that grouped hardening converged to a median of one rule per run, with a range of one to four. Across the loop, the defense blocked 2,420 of 2,421 bypasses, and mean added false positives were at or below 0.28%.
The authors also report tests beyond the original attack setup. Frozen rules blocked 96.3–100% of attacks generated by a different LLM. Applied unchanged to the unseen applications bWAPP and OWASP Juice Shop, they blocked 89.4–94.9% of SQLi bypasses and 97.6–97.7% of XSS bypasses on bWAPP, with zero added false positives on external benign traffic. The abstract does not give a corresponding XSS transfer range for Juice Shop.
What remains uncertain
These findings suggest that execution-based testing and grouped rules can work together in the evaluated setting. But they do not show that GenWebSec is ready to protect arbitrary production websites. The evidence supplied here is the paper’s abstract, not its full methods, tables, or discussion. Details needed to assess the breadth of the attack search, the target applications, and the benign-traffic tests are therefore unavailable here.
The evaluation is also bounded: it covers six custom targets, specified WAF software and rules, and particular attack agents and test applications. Results may differ with other applications, configurations, traffic patterns, or attacker strategies. A successful defense in these experiments is not proof that future adaptive attacks will fail.
GenWebSec is described in an arXiv preprint. The supplied source does not establish peer-review status, so its results should be treated as preliminary. The study offers a promising way to test adaptive defenses, but independent replication and broader real-world evaluation would be needed to establish how well the approach works in deployment.
- web application firewall
- GenWebSec
- cybersecurity
- SQL injection
- cross-site scripting
- large language models
- adaptive attacks
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
AttentionSwitch tunes selected AI attention heads to resist jailbreaks
Source published
Shared keywords: adaptive attacks, large language models
Can code-grounded AI improve malware attribution?
Source published
Shared keywords: large language models
A three-part profile of AI misuse capabilities
Source published
Shared keywords: large language models
Can cyber defenses evolve alongside AI attacks?
Source published
Shared keywords: large language models
LLMs help penetration testers find more—and raise scope risks
Source published
Shared keywords: large language models