Skip to content
Fast-turnaround security assessments available — 10+ years development & security experienceGet started
Back to Glossary
Glossary2 min read

WAF (Web Application Firewall)

A security control that filters, monitors, and blocks malicious HTTP traffic between users and a web application.

A Web Application Firewall (WAF) is a security layer that sits between users and a web application, inspecting HTTP requests and responses to detect and block malicious traffic. Unlike traditional network firewalls that operate at the network and transport layers, a WAF understands HTTP protocol semantics and can analyze request content including URL parameters, headers, cookies, and request bodies for attack patterns. WAFs provide a defensive layer against common web attacks but should not be relied upon as the sole security control.

How It Works

WAFs inspect incoming requests against a set of rules or signatures designed to identify known attack patterns. When a request matches a rule, such as a SQL injection pattern in a parameter value or a cross-site scripting payload in a form field, the WAF can block the request, log it for review, or modify it to neutralize the threat. Rules can be based on regular expressions, known attack signatures, or anomaly detection that flags requests deviating from normal application behavior.

WAFs operate in different deployment models. A reverse proxy WAF sits in front of the application and intercepts all traffic before it reaches the server. Cloud-based WAFs route traffic through a provider's infrastructure for inspection. Host-based WAFs run on the application server itself. Each model has trade-offs in terms of performance, latency, and the depth of inspection possible.

Most WAFs support both blocklist and allowlist approaches. Blocklist rules identify known bad patterns and reject matching requests. Allowlist rules define what valid requests look like and reject anything that does not conform. A combination of both approaches provides the strongest protection, but maintaining accurate rules requires ongoing tuning to minimize false positives that block legitimate users and false negatives that allow attacks through.

Why It Matters

WAFs are an important defense-in-depth measure, but they are not a substitute for secure application code. Experienced security testers routinely bypass WAF protections using encoding tricks, payload fragmentation, and logic-based attacks that do not match signature patterns. Understanding how WAFs work is essential for both defending applications effectively and conducting thorough security assessments that account for the presence of these protective layers.

Need your application tested? Get in touch.

Need your application tested?

We find these vulnerabilities in real applications every day.

Request an Assessment