A WAF bypass attack occurs when an attacker gets a malicious request past a web application firewall (WAF) without triggering its security rules. A WAF is designed to inspect incoming HTTP and HTTPS traffic and block requests that match known attack patterns. However, attackers may exploit differences in how the WAF and the backend application interpret requests, limitations in request inspection, or gaps in deployment configuration.
These weaknesses can allow malicious traffic to reach an application even when a WAF is in place. Understanding how WAF bypass attacks work helps security teams identify weaknesses and strengthen their application security controls.
Bypassing a Web Application Firewall: Three Common Routes
Attackers can use several techniques to bypass a WAF. The following are three common routes.
Parsing mismatches
A WAF and a backend application may interpret the same request differently. If the WAF fails to recognize a malicious payload because it parses the request differently from the application, the request may reach the application without being blocked.
Research into WAF bypass techniques has demonstrated how differences in request parsing can create security gaps. For example, vulnerabilities such as CVE-2024-1019 have highlighted the importance of ensuring that WAF inspection and application-side parsing work consistently.
Research from Claroty Team82 has also explored JSON-related parsing differences that can be used to evade WAF protections. The WAFFLED research identified 1,207 bypasses across tested WAF configurations, illustrating how differences in parsing and rule implementation can affect security.
Inspection limits
WAFs may impose limits on the size of request bodies, headers, or cookies they inspect. Attackers can try to send oversized request bodies or manipulate requests to take advantage of those limits.
For example, AWS WAF has different body-inspection limits depending on the service through which it is deployed. Application Load Balancers and AWS AppSync have an 8 KB body-inspection limit, while other supported integrations have a default limit of 16 KB, configurable up to 64 KB. Header and cookie inspection can also be subject to limits.
If a WAF inspects only part of a request, malicious content outside the inspected portion may go undetected, depending on the configuration and application behavior.
Origin exposure
A WAF can be bypassed if an attacker can reach the origin server directly instead of sending traffic through the WAF. This can happen when the origin IP address is exposed and access controls do not restrict direct connections.
Research from Zafran’s BreakingWAF work has examined ways attackers can identify or reach origin infrastructure behind security services. If direct origin access is not restricted, the application may remain accessible without the WAF’s inspection and protection.
Think of it like airport screening. Security screening only works when passengers pass through the checkpoint. If someone can enter through an unmonitored door, the checkpoint cannot inspect them.
WAF Bypass vs WAF Evasion
WAF bypass and WAF evasion are closely related, but they describe different aspects of getting malicious traffic past a WAF.
A WAF bypass occurs when an attacker finds a way to reach an application without the WAF providing the intended protection. This may happen because the origin is directly accessible, a security rule is missing, or a configuration gap allows traffic through.
A WAF evasion attack involves crafting or modifying requests so the WAF does not recognize them as malicious. Techniques may include encoding changes, request obfuscation, or exploiting differences in how the WAF and application parse requests.
Learn more about what WAF evasion is and how attackers bypass a WAF.
How to Prevent WAF Bypass Attacks
Organizations can reduce the risk of WAF bypass attacks by addressing both WAF configuration weaknesses and application vulnerabilities.
Restrict direct origin access
Configure network rules and access controls so that requests to the origin server must pass through the intended WAF.
Normalize requests consistently
Ensure that the WAF and backend application interpret request paths, encodings, headers, and payloads consistently.
Review request inspection limits
Understand body, header, and cookie inspection limits and how the WAF handles requests that exceed them.
Patch the WAF engine and rules
Apply security updates and keep WAF rulesets current to address known vulnerabilities and bypass techniques.
Test configurations
Conduct authorized security testing to identify parsing mismatches, missing rules, and direct-origin exposure.
Secure the application itself
Maintain application-level validation, authentication, authorization, and patching. A WAF should complement these controls, not replace them.
Preventing WAF Bypass Attacks Requires Layered Protection
A WAF is an important layer of application security, but it cannot guarantee that every malicious request will be blocked. Parsing mismatches, inspection limits, and exposed origin servers can all create opportunities for attackers to get around WAF protection.
Organizations should review WAF configurations regularly, restrict access to origin servers, apply security updates, and test for bypass opportunities. Combining WAF protection with secure application design and ongoing security testing helps reduce the risk of attacks reaching vulnerable applications.
Frequently Asked Questions (FAQ)
1. What is a WAF bypass attack?
A WAF bypass attack occurs when malicious traffic reaches a web application without being blocked by the WAF’s intended security controls. This can result from configuration gaps, parsing differences, inspection limits, or exposed origin servers.
2. Is a WAF bypass the same as a WAF evasion attack?
Not exactly. WAF bypass describes getting around the WAF’s intended protection, while WAF evasion commonly refers to modifying requests so they avoid detection by WAF rules. The terms are related and may overlap.
3. Does a WAF bypass mean the WAF is broken?
Not necessarily. Many bypasses come from setup gaps, not flaws in the WAF’s rules. For example, blocking direct access to the origin server depends on settings customers must change themselves.
4. How do attackers bypass a WAF?
Attackers may exploit differences in request parsing, inspection limits, missing security rules, or direct access to an origin server. For example, they may send oversized request bodies or craft requests that the WAF and application interpret differently.
5. Can a WAF prevent all web application attacks?
No. A WAF helps detect and block many malicious requests, but it cannot prevent every attack. It should be combined with secure coding, patch management, access controls, and regular security testing.
Block threats before they reach your app
See how a modern WAF detects and stops SQL injection, XSS, and zero-day attacks in real time.