Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
A web application firewall (WAF) inspects and filters HTTP and HTTPS traffic between users and a web application, blocking common attacks such as SQL injection and cross-site scripting.

What Is a Web Application Firewall (WAF)?
A web application firewall (WAF) is a security control that sits in front of a web application and inspects the HTTP and HTTPS requests sent to it. It looks for patterns associated with attacks, such as SQL injection, cross-site scripting, and path traversal, and blocks or flags malicious requests before they reach the application.
A traditional network firewall decides whether traffic may pass based on IP addresses, ports, and protocols. It would happily allow a request to port 443 that contains a SQL injection payload. A WAF works at the application layer (layer 7) and understands the content of web requests, which is why it can catch what network firewalls miss.
A WAF acts as a reverse proxy or filter. Each request is decrypted where necessary, parsed, and evaluated against a set of rules. Depending on the result, the WAF allows the request, blocks it, challenges the client (for example with a CAPTCHA or JavaScript check), or simply logs it for review.
Two security models are used, often together:
Modern WAFs add behavioural analysis, bot detection, rate limiting, API schema validation, and threat intelligence feeds. The open-source OWASP Core Rule Set, used with engines such as ModSecurity and Coraza, is widely deployed and also underpins many commercial products.
| Deployment | Description | Typical use |
|---|---|---|
| Cloud or CDN-based | Traffic is routed through a provider’s network | Public websites, DDoS protection, quick deployment |
| Network appliance | Hardware or virtual appliance in your data centre | High-performance, on-premises applications |
| Host-based or embedded | Module running on the web server or within the application | Fine-grained control, microservices |
| Cloud platform native | WAF offered by AWS, Azure, or Google Cloud | Applications hosted on those platforms |
A WAF is a valuable layer, but it is not a fix for insecure code:
Start in monitoring mode to understand normal traffic, then move to blocking once false positives are under control. Ensure the origin server only accepts traffic from the WAF. Keep rule sets updated, review logs regularly, and integrate alerts with your SIEM. Above all, use the WAF alongside secure development and regular application testing, not instead of them.
At Privia Security, our Web Application Security Services test whether your applications and WAF configurations stand up to real attacks, including common WAF bypass techniques.
A network firewall controls traffic based on IP addresses, ports, and protocols, deciding which connections are allowed. A WAF inspects the content of web requests at the application layer and blocks attacks such as SQL injection and cross-site scripting. Most organisations need both, as they protect against different types of threats.
No. A WAF can block many common attacks and provide temporary virtual patches, but it cannot fix business logic flaws, broken access control, or insecure design, and skilled attackers can sometimes bypass its rules. Secure development and regular application testing remain essential, with the WAF serving as an additional layer of protection.
PCI DSS version 4.0 requires public-facing web applications to be protected by an automated technical solution that continually detects and prevents web-based attacks, and a WAF is the most common way to meet it. This requirement became mandatory on 31 March 2025. Alternatives exist, but they must provide equivalent protection.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.