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. Unlike a traditional network firewall, which filters traffic by address and port, a WAF reads the content of each request and blocks those that match known attack patterns, such as SQL injection and cross-site scripting. Other attacks a WAF is commonly configured to block include remote file inclusion (RFI), in which a site is tricked into loading and running a malicious file from an attacker's server.
WAFs can run as hardware appliances, as software on the server or, increasingly, as cloud services that also absorb DDoS attacks and filter malicious bots. Banks, payment processors and crypto exchanges use them to protect login pages, checkout flows and APIs. The PCI DSS standard for card data expects public-facing web applications to be protected against known attacks, and an automated solution such as a WAF is a common way to meet that requirement under PCI DSS 4.0. A WAF reduces but does not remove the need for secure code.
Ref 1300000370