Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 5 of 6 · Worked example · 25 min · revision 3

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

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.

02. Structuring professional vulnerability findings and CVSS scoring

A professional security finding must be actionable, reproducible, and objective. Security teams avoid vague statements like "The login page is insecure." Instead, findings follow a formal five-part anatomy:

  1. Title and metadata: Clear title, affected URI, OWASP category (e.g., A01:2025 - Broken Access Control in the current, 2025 edition), and CVSS base score (e.g., 8.1 HIGH - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N). Compute the number from the vector with the FIRST CVSS v3.1 calculator rather than by hand. CVSS v4.0 (2023) is the current version of the standard; this lesson uses v3.1 because many trackers and bug bounty platforms still score with it. Use whichever version your organisation reports in, and always state it in the vector.
  2. Vulnerability description and root cause: Precise technical explanation of the flaw (e.g., "Endpoint /v1/invoices/{id} queries invoices by primary key without asserting caller tenant ID").
  3. Reproduction steps (proof of concept, PoC): Minimal, deterministic curl command or HTTP request showing exact headers and payload needed to replicate the bug.
  4. Business impact: Explicit consequences if exploited (e.g., "Unauthorized disclosure and alteration of competitor tenant financial records").
  5. Remediation guidance: Specific code-level guidance (e.g., "Filter by tenant_id in SQL query and return HTTP 404 on missing records").

The Common Vulnerability Scoring System (CVSS v3.1) metrics give developers a shared way to rank fixes:

  • Attack vector (AV:N): Network exploitable without physical or local machine access.
  • Attack complexity (AC:L): Low complexity requiring no specialized conditions or timing races.
  • Privileges required (PR:L): Requires standard unprivileged user credentials.
  • User interaction (UI:N): Requires zero victim interaction (unlike reflected XSS or CSRF).
  • Scope (S:U): Unchanged security authority boundary.
  • Confidentiality, integrity and availability (C:H/I:H/A:N): High confidentiality and integrity impact, but no denial-of-service impact.

CVSS itself defines no deadlines. Many organisations map its severity bands to their own fix targets, for example Critical (9.0–10.0) within 24 hours, High (7.0–8.9) within 7 days, and Medium (4.0–6.9) in a scheduled development cycle; use your organisation's policy.

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:

ModSecurity v3 · allowlist virtual patch for the reports endpoint (not run in this lesson)
# 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,log instead of deny), sending matches to Elasticsearch or CloudWatch to find false positives, then switch it to deny. Do not use SecRuleEngine DetectionOnly for 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

Practice check · 3 questions

Vulnerability findings, WAF tuning, and virtual patching

Three questions on vulnerability documentation, WAF mechanics, and virtual patches.

Q1. Why does the virtual patch allow only file names matching `^[A-Za-z0-9_-]{1,64}\.pdf$` instead of blocking `..`?
Q2. In the virtual patch, the first SecRule (on REQUEST_FILENAME) carries `deny` and the chained rule on ARGS:file has no action of its own. When is a request denied?
Q3. Why can a WAF not replace fixing the vulnerable code?
Practice only: not graded, not saved, not evidence.

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.

Sign in to mark reading complete

Prove this skill

10 questions · about 8 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check