As cybersecurity continues to evolve, one of the most critical components for protecting web applications is the Web Application Firewall (WAF). I recently had the chance to recommend a few security products to clients, and WAFs, as always, were at the top of the list. In this article, I’ll walk you through a comprehensive evaluation of several popular WAFs in 2026. The goal? To help you understand how well these WAFs perform in real-world scenarios.
What Makes WAF Testing Effective?
Testing the effectiveness of a WAF requires a scientific approach. We need to focus on key performance metrics that give us a solid understanding of how well each WAF handles threats while minimizing interference with legitimate traffic. Here are the key metrics I focused on:
- Detection Rate: This shows how well the WAF detects attack traffic. Low detection rates lead to "false negatives" — essentially, attacks that slip through the cracks.
- False Positive Rate: This indicates how often the WAF incorrectly blocks legitimate requests. We want a low false positive rate to ensure normal traffic isn’t disrupted.
- Accuracy Rate: A comprehensive metric that combines detection and false positive rates. High accuracy means the WAF is good at balancing detection without triggering unnecessary alarms.
- Detection Latency: The time it takes for the WAF to detect and block malicious traffic. Lower latency is better, as it ensures quick protection against attacks.
We’ll calculate these metrics using traditional classification formulas:
- TP: True Positives (attacks correctly detected)
- TN: True Negatives (normal traffic allowed through)
- FN: False Negatives (attacks missed)
- FP: False Positives (legitimate traffic blocked)
Here are the formulas used:
- Detection Rate = TP / (TP + FN)
- False Positive Rate = FP / (TP + FP)
- Accuracy Rate = (TP + TN) / (TP + TN + FP + FN)
Test Samples: Real-World Data
I used real-world traffic to generate the test data. Here’s how I collected the samples:
- Normal Traffic (White Samples): Browsed various forums, totaling 60,707 HTTP requests and 2.7 GB of data. This took around 5 hours to collect.
-
Attack Traffic (Black Samples): Gathered attack traffic from four different sources, totaling 600 requests. This included:
- Common vulnerability attacks via DVWA (Damn Vulnerable Web Application)
- Official attack payloads from PortSwigger
- Targeted attack traffic from VulHub vulnerabilities
- High-confrontation traffic, testing DVWA under medium-to-high protection levels
Testing Setup
To ensure a fair test, all WAFs were tested in their default configurations. The target machine used was a simple Nginx server that responded with a "200 OK" for any incoming request. Here’s the configuration for the server:
location / {
return 200 'hello WAF!';
default_type text/plain;
}
The testing tool I used parses the HTTP requests captured via Burp Suite, processes them, and sends them to the target machine. The tool tracks which requests are successfully intercepted by the WAF and automatically calculates the key metrics outlined above.
The Results: WAF Comparison
Now, let’s dive into the results. Below are the performance statistics for each WAF tested:
SafeLine WAF
- Detection Rate: 74.09%
- False Positive Rate: 8.19%
- Accuracy Rate: 99.44%
- 90% Average Latency: 0.73 ms
- 99% Average Latency: 0.89 ms
Coraza
- Detection Rate: 70.26%
- False Positive Rate: 92.77%
- Accuracy Rate: 84.10%
- 90% Average Latency: 3.09 ms
- 99% Average Latency: 5.10 ms
ModSecurity
- Detection Rate: 69.57%
- False Positive Rate: 94.86%
- Accuracy Rate: 77.56%
- 90% Average Latency: 1.36 ms
- 99% Average Latency: 1.71 ms
Baota WAF
- Detection Rate: 38.96%
- False Positive Rate: 30.00%
- Accuracy Rate: 98.67%
- 90% Average Latency: 0.53 ms
- 99% Average Latency: 0.66 ms
ngx-lua-waf
- Detection Rate: 37.04%
- False Positive Rate: 69.04%
- Accuracy Rate: 97.51%
- 90% Average Latency: 0.41 ms
- 99% Average Latency: 0.49 ms
SuperWAF
- Detection Rate: 24.00%
- False Positive Rate: 25.00%
- Accuracy Rate: 98.57%
- 90% Average Latency: 0.34 ms
- 99% Average Latency: 0.41 ms
Summary Table
| WAF | Detection Rate | False Positive Rate | Accuracy Rate | 90% Latency | 99% Latency |
|---|---|---|---|---|---|
| SafeLine WAF | 74.09% | 8.19% | 99.44% | 0.73 ms | 0.89 ms |
| Coraza | 70.26% | 92.77% | 84.10% | 3.09 ms | 5.10 ms |
| ModSecurity | 69.57% | 94.86% | 77.56% | 1.36 ms | 1.71 ms |
| Baota WAF | 38.96% | 30.00% | 98.67% | 0.53 ms | 0.66 ms |
| ngx-lua-waf | 37.04% | 69.04% | 97.51% | 0.41 ms | 0.49 ms |
| SuperWAF | 24.00% | 25.00% | 98.57% | 0.34 ms | 0.41 ms |
What Do These Results Mean?
SafeLine WAF stands out as the best overall performer. It has the highest accuracy rate and the lowest false positive rate, making it an excellent choice for protecting your web applications while minimizing disruptions.
Coraza and ModSecurity are great at detecting attacks, but they generate far too many false positives. This makes them less practical for production environments where normal traffic must be allowed through without interference.
Baota WAF and ngx-lua-waf are not as effective at detecting attacks as SafeLine, but they have relatively low latency and decent accuracy, making them suitable for certain use cases.
SuperWAF, while quick with very low latency, falls behind in terms of attack detection.
Conclusion
WAFs are a vital component of a security strategy, but not all are created equal. Depending on your needs, you might prioritize different aspects: some WAFs excel in low latency but miss many attacks, while others have higher detection rates at the cost of false positives.
This test should serve as a reference point, but keep in mind that different use cases and environments might lead to different outcomes. Always test a WAF in your own environment before making a final decision.
Top comments (0)