Writing Findings That Get Fixed
A web test ends with a document, and the document is the only part most people will ever see. A developer who can't reproduce a finding won't fix it; a manager who can't tell a critical from a cosmetic issue will schedule both for "later"; an auditor who finds no evidence will treat the test as not done. A good finding is short, reproducible, honest about severity and specific about the fix. This lesson gives the structure of a finding, computes a CVSS score so severity isn't a feeling, and generates a finding from structured data, which is how teams keep dozens of findings consistent. The full report (scope, methodology, executive summary) is the subject of Ethical Hacking & Penetration Testing; the mini project of this course uses the template below.
Anatomy of a finding
| Field | Content | Common mistake |
|---|---|---|
| Id and title | F-02 SQL injection in product search (q parameter): weakness + where |
"SQL problem" |
| Severity | rating plus a CVSS vector (v4.0 is current; v3.1 is still widely used) and a sentence on why | severity from the tool's default, never adjusted to context |
| Affected | host, endpoint, parameter, version/commit, environment | "the website" |
| Description | what is wrong, in two to four sentences, with the CWE (CWE-89) and OWASP category (A05:2025) |
a copy of a generic vulnerability description |
| Impact | what an attacker could do in this application (read all customer e-mails; act as any user) | "could lead to compromise" |
| Reproduction | numbered steps a developer can follow, with exact requests; test accounts, not real data | "use sqlmap" |
| Evidence | request/response excerpts, screenshots, timestamps, with secrets and personal data redacted | 40 pages of scanner output |
| Remediation | the specific fix (parameterise this query; check ownership in this handler), plus defence in depth | "sanitise input" |
| References | CWE, OWASP cheat sheet, framework documentation | none |
| Status | open / fixed / retested on date / accepted risk | missing, so nobody knows if it was fixed |
Severity with CVSS
The Common Vulnerability Scoring System (FIRST) turns a vulnerability's properties into a 0–10 score and a vector string that shows the reasoning. CVSS v4.0 (2023) is the current version: it adds attack requirements (AT), splits impact into the vulnerable system (VC/VI/VA) and subsequent systems (SC/SI/SA), and computes scores from lookup tables, so use FIRST's calculator for it. CVSS v3.1 has a closed formula, which makes it a good way to see how the metrics combine; the example implements the v3.1 base score and checks it against two well-known vectors.
import math
W = {"AV": {"N": 0.85, "A": 0.62, "L": 0.55, "P": 0.2}, "AC": {"L": 0.77, "H": 0.44},
"UI": {"N": 0.85, "R": 0.62}, "CIA": {"H": 0.56, "L": 0.22, "N": 0.0}}
PR = {"U": {"N": 0.85, "L": 0.62, "H": 0.27}, "C": {"N": 0.85, "L": 0.68, "H": 0.5}}
def roundup(x): # CVSS v3.1 Appendix A
i = round(x * 100000)
return i / 100000.0 if i % 10000 == 0 else (math.floor(i / 10000) + 1) / 10.0
def cvss31(vector):
m = dict(part.split(":") for part in vector.split("/")[1:])
iss = 1 - (1 - W["CIA"][m["C"]]) * (1 - W["CIA"][m["I"]]) * (1 - W["CIA"][m["A"]])
if m["S"] == "U":
impact = 6.42 * iss
else:
impact = 7.52 * (iss - 0.029) - 3.25 * (iss - 0.02) ** 15
expl = 8.22 * W["AV"][m["AV"]] * W["AC"][m["AC"]] * PR[m["S"]][m["PR"]] * W["UI"][m["UI"]]
if impact <= 0:
return 0.0
return roundup(min(impact + expl, 10)) if m["S"] == "U" else roundup(min(1.08 * (impact + expl), 10))
def rating(score):
return "None" if score == 0 else "Low" if score < 4 else "Medium" if score < 7 else "High" if score < 9 else "Critical"
cases = {
"reference: unauthenticated RCE": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"F-01 BOLA, any customer reads invoices": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"F-02 SQLi in search, unauthenticated": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"F-03 stored XSS in guestbook": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
"F-06 debug traceback": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
}
for name, vec in cases.items():
s = cvss31(vec)
print(f"{name:40} {s:4} {rating(s):8} {vec}")reference: unauthenticated RCE 9.8 Critical CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
F-01 BOLA, any customer reads invoices 6.5 Medium CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
F-02 SQLi in search, unauthenticated 9.1 Critical CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
F-03 stored XSS in guestbook 5.4 Medium CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
F-06 debug traceback 5.3 Medium CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
The reference vector gives the familiar 9.8, and the BOLA finding 6.5, both matching FIRST's published calculator. The vector is as important as the number: a reader sees why the XSS scores lower (it needs a logged-in attacker and a victim's interaction) and can challenge a metric instead of the whole rating. Context can still move the final rating: CVSS measures the technical severity, and your report may raise a "Medium" that exposes regulated health data, saying so explicitly.
The calculator lab is set to F-01's vector (6.5, Medium) and shows each metric's weight and every line of the formula, so you can check a metric before you defend it in a review. Change PR from Low to None and the same BOLA becomes an unauthenticated read of invoices: 7.5, High. Set I to High as well and it is 8.1. That is the kind of question a developer asks ("does it really need no login?"), and the vector string answers it.
Generating findings from data
Keeping findings as structured data (YAML, JSON, a tracker) and rendering them with one template keeps the report consistent and makes retesting a status change rather than an edit.
finding = {
"id": "F-01", "title": "Invoices of other customers readable (BOLA)",
"severity": "Medium (CVSS 3.1: 6.5, AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N)",
"affected": "GET /api/invoices/{id}, api.shop.lab.test, build 2026.11.3 (staging)",
"cwe": "CWE-639", "owasp": "A01:2025 Broken Access Control; API1:2023 BOLA",
"description": "The endpoint returns any invoice whose id is supplied, checking only that the caller is logged in.",
"impact": "Any registered customer can read every invoice: names, addresses and order totals of all customers.",
"steps": ["Log in as test user lab-a (owns invoice 1001).",
"Request GET /api/invoices/1002 with lab-a's token.",
"Observe 200 and invoice 1002, which belongs to test user lab-b."],
"evidence": "HTTP/1.1 200 OK ... {\"id\": 1002, \"customer\": \"Lab B\", ...} (2026-11-20 10:42 UTC)",
"fix": "Scope the query by the caller: WHERE id = ? AND owner_id = ?; return 404 otherwise. "
"Add a two-user test for every endpoint that takes an object id.",
"status": "Open",
}
def render(f):
lines = [f"### {f['id']} {f['title']}", "",
f"**Severity:** {f['severity']} ", f"**Affected:** {f['affected']} ",
f"**Classification:** {f['cwe']}, {f['owasp']} ", f"**Status:** {f['status']}", "",
f"**Description.** {f['description']}", "", f"**Impact.** {f['impact']}", "", "**Reproduction.**"]
lines += [f"{i}. {s}" for i, s in enumerate(f["steps"], 1)]
lines += ["", f"**Evidence.** `{f['evidence']}`", "", f"**Remediation.** {f['fix']}"]
return "\n".join(lines)
print(render(finding))### F-01 Invoices of other customers readable (BOLA)
**Severity:** Medium (CVSS 3.1: 6.5, AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N)
**Affected:** GET /api/invoices/{id}, api.shop.lab.test, build 2026.11.3 (staging)
**Classification:** CWE-639, A01:2025 Broken Access Control; API1:2023 BOLA
**Status:** Open
**Description.** The endpoint returns any invoice whose id is supplied, checking only that the caller is logged in.
**Impact.** Any registered customer can read every invoice: names, addresses and order totals of all customers.
**Reproduction.**
1. Log in as test user lab-a (owns invoice 1001).
2. Request GET /api/invoices/1002 with lab-a's token.
3. Observe 200 and invoice 1002, which belongs to test user lab-b.
**Evidence.** `HTTP/1.1 200 OK ... {"id": 1002, "customer": "Lab B", ...} (2026-11-20 10:42 UTC)`
**Remediation.** Scope the query by the caller: WHERE id = ? AND owner_id = ?; return 404 otherwise. Add a two-user test for every endpoint that takes an object id.
The reproduction uses test accounts and the evidence is an excerpt with a timestamp; nothing in it is a real customer's data.
Detection, in report form
Every finding should also say how the issue can be detected if it is exploited before it is fixed: the log query, WAF rule or alert that would have caught the attack (one user reading many invoice ids; UNION in search parameters). Defenders act on that the same day; the fix may take a release cycle. It also shows whether a missing detection is a finding of its own (A09:2025 Security Logging and Alerting Failures).
Pitfalls
- Overstating ("full compromise") or understating to please the client; both destroy trust in the report.
- Including secrets or personal data in evidence: redact tokens, passwords and real customers' details; the report will be e-mailed.
- Scanner findings without triage: false positives in a report teach readers to ignore it.
- Remediation that says what, not how: name the line, the function or the configuration setting.
Practice
1. Score CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N with the function above, and name a finding it fits.
7.5 (High): an unauthenticated network attacker reads confidential data, e.g. the SSRF to the metadata service returning credentials, or an unauthenticated IDOR. (Run cvss31() on the vector to check.)
2. Rewrite the remediation "Sanitise all input to prevent XSS" for the guestbook finding.
"Render comments with the template engine's auto-escaping (remove |safe in guestbook.html, line 14); store comments raw; add Content-Security-Policy: script-src 'nonce-…'; add a regression test that a comment containing <img src=x onerror=…> is rendered as text."
Test yourself
What makes a reproduction section useful?
- A tool name
- Numbered steps with exact requests and test accounts that a developer can follow
- A screenshot of the scanner
- The word 'easily'
What does the CVSS vector add to the score?
- Nothing
- The reasoning: each metric is visible and can be challenged or adjusted
- Encryption
- The fix
Which CVSS version is current?
- 2.0
- 3.0
- 4.0
- 5.0
Why should a finding include how to detect exploitation?
- It is decoration
- Defenders can watch for attacks immediately while the fix is scheduled
- It replaces the fix
- CVSS requires it
In the calculator lab, F-01 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N, 6.5) turns out to need no login at all. What does PR:N make it?
- 6.5 Medium, unchanged
- 7.5 High
- 8.1 High
- 9.8 Critical