Findings, Fixes and Interim WAF Mitigations
Structure professional security vulnerability findings, tune Web Application Firewall (WAF) rule sets, and deploy interim virtual patches to shield live systems while code fixes are authored.
Contentsand lesson path
On this page
- Why it matters
- Structuring professional vulnerability findings and CVSS scoring
- Worked example: Deploying interim virtual patches on a WAF
- Check your understanding
- Apply it
- Review prompt
Lessons of Web Application Security
- Browser Trust and Client-Side Hardening Concept · 25 min
- Injection, Traversal, XSS and SSRF: Root Causes and Fixes Worked example · 30 min
- Testing a Practice App Through an Intercepting Proxy Lab · 30 min
- Finding and Fixing Access Control, API and Session Flaws Lab · 30 min
- Findings, Fixes and Interim WAF Mitigations Worked example · 25 min
- Web Application Security Check Knowledge check · 10 questions
What you will learn
- Write a web finding with impact, reproduction conditions, OWASP Top 10 or API Security Top 10 category, severity and a remediation a developer can act on, plus an interim compensating control such as a tuned WAF rule when the fix will take time.
01. Why it matters
When a security vulnerability is identified in production—whether through an internal penetration test, an automated scanner, or an external bug bounty report—the flaw is live and reachable from the internet, but a tested fix that breaks nothing may take hours or days of development, code review and regression testing.
Two practices help a team through that gap:
- Clear, standard findings. Documenting vulnerabilities clearly with shared frameworks (CVSS scores, OWASP Top 10 categories, reproduction steps and root-cause analysis), so engineers can understand and fix the defect quickly.
- Virtual patches on a web application firewall (WAF). Applying a quick, targeted rule that inspects HTTP requests at the edge (Cloudflare, AWS WAF, or ModSecurity) to intercept and drop exploit attempts before they reach the vulnerable application servers, buying time for the core code fix to land.
Clear findings get the right fix written quickly, and a virtual patch shortens the time in which the flaw can be exploited while that fix is on its way.
03. Worked example: Deploying interim virtual patches on a WAF
A Web Application Firewall (WAF) operates at Layer 7 of the OSI model, inspecting HTTP request lines, headers, query parameters, and JSON/form bodies against defensive rule sets such as the OWASP ModSecurity Core Rule Set (CRS).
When a critical flaw is found that has no code fix yet (such as an unauthenticated path traversal flaw in /v1/reports/download?file=...), the security team applies a virtual patch at the WAF level. A virtual patch inspects the specific vulnerable URL parameter. Blocking known attack patterns such as .. is fragile: ModSecurity URL-decodes ARGS once, so a rule looking for %2e%2e never matches, double encoding (%252e%252e) and backslashes slip past a pattern without the right transformations, and an absolute path such as file=/etc/passwd contains no .. at all (Python's os.path.join(base, "/etc/passwd") simply discards base). Where the endpoint's valid inputs are known, an allowlist is much more robust. Before relying on the rule, send file=report-123.pdf (must pass) and file=../../etc/passwd, file=..%252f..%252fetc%252fpasswd, file=/etc/passwd and file=..\..\win.ini (must get 403) through a staging WAF.
Here is an example of an interim virtual patch rule configured for ModSecurity / Coraza WAF engine:
# Rule 100001: virtual patch for path traversal in /v1/reports/download.
# Allowlist: this endpoint only ever serves names like report-123.pdf, so
# anything else (../, absolute paths, backslashes, encodings) is refused.
SecRule REQUEST_FILENAME "@beginsWith /v1/reports/download" \
"id:100001,\
phase:2,\
deny,\
status:403,\
log,\
msg:'Virtual patch: invalid file name on reports download',\
tag:'CVE-LOCAL-2026-01',\
t:none,t:urlDecodeUni,t:normalizePath,\
chain"
SecRule ARGS:file "!@rx ^[A-Za-z0-9_-]{1,64}\.pdf$" "t:none"In production environments, out-of-the-box WAF rule sets frequently generate false positives (blocking legitimate user requests that happen to contain benign SQL keywords like "select" or "union" in blog posts or search boxes).
To tune WAF rules without causing operational outages:
-
Anomaly scoring mode: Rather than blocking on the first rule match, modern CRS calculates a cumulative anomaly score. A request is blocked once its total score reaches or exceeds a configured threshold (5 by default, so a single critical match, which scores 5, is enough).
-
Staging new rules: Run a new rule in log-only form for 48 to 72 hours (give it
pass,loginstead ofdeny), sending matches to Elasticsearch or CloudWatch to find false positives, then switch it todeny. Do not useSecRuleEngine DetectionOnlyfor this: that setting turns the whole WAF into detection-only mode, so every existing protection stops blocking too. -
Targeted rule exclusions: Add specific exclusion rules (
SecRuleUpdateTargetById) targeting individual harmless parameters rather than disabling entire security categories globally.
Staging every rule and tuning it against real traffic keeps false positives from blocking customers, while the rules still stop the exploit attempts you wrote them for.
04. Check your understanding
05. Apply it
Draft a formal security finding report for a simulated BOLA vulnerability using the five-part anatomy covered in this lesson. Include exact CVSS v3.1 metrics (with the score computed from the vector by the FIRST calculator), reproduction curl commands, and remediation steps.
Next, write a ModSecurity virtual patch rule targeting the vulnerable endpoint, deploy it log-only (pass,log on that rule, not the global SecRuleEngine DetectionOnly), and verify that test exploit payloads trigger alerts while benign customer requests pass unimpeded. Once alert thresholds are confirmed, switch the rule to active blocking and verify with curl that exploit attempts receive an immediate HTTP 403 response.
Ensure your virtual patches are tracked in an incident ticketing backlog with strict deadlines so they are retired promptly once backend code updates are verified in production.
With this lesson completed, you have practised the core techniques of Web Application Security: browser trust headers and CSP, injection and SSRF remediation, proxy testing with mitmproxy, access control fixes, and WAF virtual patching.
06. Review prompt
Detail the five essential sections of a professional vulnerability finding report. Explain the operational purpose and emergency lifecycle of a virtual patch, describe why WAFs cannot replace code fixes, and detail how anomaly scoring mode and log-only staging of new rules keep WAF false positives from blocking customers.
References
Your progress
Reading state
Sign in to save that you finished reading this lesson.
Prove this skill
10 questions · about 8 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.