TExcelTAD
Home › Security Research: Fuzzing, Vulnerability Discovery, Kernel, Browser & AI Security › Writing an Advisory; Bug Bounties and Safe Harbour

Writing an Advisory; Bug Bounties and Safe Harbour

The advisory is the public end of a research project: the text that thousands of administrators, developers and scanners will read to decide what to do. A bug report (Root-Cause Analysis) is written for the maintainer who fixes; an advisory is written for everyone who deploys. It must be precise about versions, honest about severity, clear about what to do, and free of anything that helps attackers more than defenders. This lesson gives a template and a linter for advisories, then covers the bug-bounty programmes through which much research is reported, and what legal safe harbour does and doesn't give you.

What an advisory contains

Section Content Common mistake
identifier and title the advisory ID, the CVE ID, a title that names the component and the bug class "Security issue in labtlv"
severity qualitative rating plus CVSS vector, with the version (CVSS-B for v4.0 base) a score without a vector; v3.1 and v4.0 mixed
affected and fixed versions exact ranges; also affected configurations "older versions", "the latest version"
summary what is wrong, in two or three sentences, the CWE vague wording, or a full exploit write-up
impact what an attacker can achieve, under which conditions; whether exploitation is known overstatement ("total compromise") or understatement ("only a crash")
workarounds and mitigations what users can do before upgrading missing: some users can't upgrade today
timeline report, confirmation, fix, publication missing, which hides slow handling
credit the finder, as they wish to be named forgotten, which discourages future reports
references fix commit, release notes, CVE record links to private trackers

Machine-readable formats travel alongside the text: OSV (used by open-source ecosystems, built in From Crash to Patch), CSAF (the OASIS Common Security Advisory Framework, used by many vendors and CERTs, including VEX documents that say which products are not affected) and the CVE record itself (previous lesson).

Exploit details: how much is enough?

An advisory says what and where, not how to weaponise. "A crafted file with a name record longer than 16 bytes overwrites the stack in rec_name()" lets defenders write detection rules, check their own forks and understand the risk. Offsets, return-address layouts, gadget chains or shellcode help nobody patch. Researchers sometimes publish deeper technical write-ups later, after users have had time to update; that is a separate decision, with the vendor's knowledge.

A template and a linter

The example renders an advisory for the toy parser from structured data and lints it: all required sections present, no vague phrases, a concrete fixed version, and no exploit-level detail. It then lints a weak draft to show what the checks catch. The severity line gives the CVSS v4.0 vector; its macrovector is 100200, computed as in CVSS v4.0, and the numeric score comes from FIRST's calculator, never from memory: for this vector it gives 8.5, inside the High band (7.0 to 8.9). It runs in your browser:

python · try it yourself
import re

advisory = {
    "id": "LAB-2026-0001", "cve": "CVE-2026-0000 (placeholder)",
    "title": "Stack buffer overflow in labtlv when parsing long name records",
    "severity": "High (CVSS-B, vector CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N)",
    "affected": "labtlv 1.0.0 up to and including 1.4.1",
    "fixed": "labtlv 1.4.2",
    "summary": ("rec_name() copies the value of a TLV1 name record into a 16-byte stack buffer without "
                "checking its length. A crafted file with a longer name overwrites stack memory of any "
                "program that parses it."),
    "impact": ("Programs that open untrusted TLV1 files can crash; memory corruption of this kind can "
               "often be turned into code execution. No exploitation has been observed."),
    "workaround": "Do not open TLV1 files from untrusted sources until you have upgraded.",
    "timeline": ["2026-03-02 reported", "2026-03-04 confirmed", "2026-04-12 fix ready",
                 "2026-05-12 coordinated publication"],
    "credit": "A. Researcher",
    "references": ["https://git.lab.test/labtlv/commit/abc1234"],
}

REQUIRED = ["title", "severity", "affected", "fixed", "summary", "impact", "workaround", "timeline", "credit"]
VAGUE = r"\b(may possibly|some versions|certain conditions|a vulnerability exists)\b"
TOO_MUCH = r"(shellcode|\\x[0-9a-f]{2}\\x|return address at|ROP|gadget)"

def lint(a):
    problems = [f"missing section: {k}" for k in REQUIRED if not a.get(k)]
    text = " ".join(str(v) for v in a.values())
    problems += [f"vague wording: '{m}'" for m in re.findall(VAGUE, text, re.I)]
    problems += [f"exploit detail does not belong in an advisory: '{m}'" for m in re.findall(TOO_MUCH, text)]
    if not re.search(r"\d+\.\d+\.\d+", a.get("fixed", "")):
        problems.append("fixed version must be a concrete version number")
    return problems or ["OK"]

def render(a):
    lines = [f"# {a['id']}: {a['title']}", "",
             f"**CVE:** {a['cve']}  ", f"**Severity:** {a['severity']}  ",
             f"**Affected:** {a['affected']}  ", f"**Fixed in:** {a['fixed']}", "",
             "## Summary", a["summary"], "", "## Impact", a["impact"], "",
             "## Workaround", a["workaround"], "", "## Timeline"] + [f"- {t}" for t in a["timeline"]]
    return "\n".join(lines + ["", "## Credit", a["credit"]])

print("lint:", lint(advisory))
draft = dict(advisory, fixed="the latest version", workaround="",
             summary="A vulnerability exists under certain conditions; the return address at offset 24 is overwritten.")
print("lint of a weak draft:")
for p in lint(draft):
    print("  -", p)
print()
print("\n".join(render(advisory).splitlines()[:8]))
lint: ['OK']
lint of a weak draft:
  - missing section: workaround
  - vague wording: 'A vulnerability exists'
  - vague wording: 'certain conditions'
  - exploit detail does not belong in an advisory: 'return address at'
  - fixed version must be a concrete version number

# LAB-2026-0001: Stack buffer overflow in labtlv when parsing long name records

**CVE:** CVE-2026-0000 (placeholder)  
**Severity:** High (CVSS-B, vector CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N)  
**Affected:** labtlv 1.0.0 up to and including 1.4.1  
**Fixed in:** labtlv 1.4.2

## Summary

The weak draft fails in the usual ways: no workaround, phrases like "a vulnerability exists under certain conditions" that tell a reader nothing, an offset-level detail that belongs nowhere in an advisory, and "the latest version" instead of 1.4.2. A linter like this one is cheap to run in the pipeline that publishes advisories, next to a human review.

Bug-bounty programmes

A bug bounty is a disclosure programme that pays for valid reports. Programmes are run by vendors directly or through platforms, and their published rules are your authorisation (Authorization, Scope and Rules of Engagement):

  • Scope: which assets (domains, apps, versions, source repositories) may be tested, and which are explicitly out of scope (third-party services, corporate IT, physical offices).
  • Allowed and forbidden techniques: almost always forbidden are denial of service, social engineering of staff, physical attacks, accessing other users' data beyond the minimum proof, and automated scanning above stated rates.
  • Rewards: by severity and quality; a clear reproducer, root cause and fix suggestion are often rewarded; the first valid report of an issue wins and later ones are duplicates.
  • Disclosure: whether and when you may publish, often only with the programme's consent after the fix.
  • Payment practicalities: identity checks, tax, sanctions screening; some programmes exclude employees or residents of certain countries.

Programmes that cover open-source software (some fund research on critical projects) and vendor programmes for software you run locally are the natural home for the kind of research this course teaches: you test your own copy, not someone else's servers.

Safe harbour, and its limits

A safe-harbour clause promises that research which follows the programme's rules is considered authorised and that the organisation will not take legal action or support action against you. Standard texts (such as those published by disclose.io) and clauses that name the relevant laws are better than vague promises. The limits, discussed in Security Foundations (US Law, UK and EU Law, Vietnamese Law): a company can waive only its own claims, not a prosecutor's or a third party's (a cloud provider, another customer); safe harbour covers what the rules allow, nothing more; and laws differ by country. When the scope is unclear, ask the programme in writing before testing.

Pitfalls

  • Advisories for experts only. Many readers are administrators: state plainly what to upgrade, how to check, and what to do meanwhile.
  • Version ranges that don't match the CVE record or the package metadata, which breaks scanners.
  • Testing outside scope "because it was the same bug". Report the in-scope finding and ask before touching anything else.
  • Publishing a write-up before the agreed date, which can void the bounty and the safe harbour.

Practice

1. Rewrite "a vulnerability exists in some versions under certain conditions" for the toy bug.

"labtlv 1.0.0 to 1.4.1 overflow a 16-byte stack buffer in rec_name() when parsing a TLV1 name record longer than 16 bytes. Any program that parses untrusted TLV1 files is affected. Upgrade to 1.4.2."

2. A programme's scope lists app.lab.test; you notice the same bug on legacy.lab.test. What do you do?

Report the in-scope finding on app.lab.test, mention in the report that legacy.lab.test appears to run the same version (from passive information only), and ask whether you may test it. Do not test it until they say yes in writing.

3. Add a lint rule: the advisory must say whether exploitation is known.

For example: if not re.search(r"(no exploitation has been observed|exploited in the wild|known to be exploited)", a["impact"], re.I): problems.append("impact must state whether exploitation is known"). The example's impact text passes it.

Test yourself

Who is the main audience of a public advisory?

  1. The developer who fixes the bug
  2. Everyone who deploys the software and must decide what to do
  3. Attackers
  4. Journalists

Which detail does NOT belong in an advisory?

  1. Affected and fixed versions
  2. The offset of the overwritten return address and a payload layout
  3. A workaround
  4. The CVSS vector

What does a bug-bounty programme's scope page do for a researcher?

  1. Nothing legal
  2. It is the authorisation: what may be tested and how
  3. It lists past payouts
  4. It replaces the law

What can a company's safe-harbour clause NOT do?

  1. Promise not to sue you
  2. Waive the claims of a prosecutor or a third party
  3. Consider rule-following research authorised
  4. Name the laws it applies to