TExcelTAD
Home › Security Foundations: Concepts, Law, Ethics & Your Lab › Responsible Disclosure, Bug Bounties and security.txt

Responsible Disclosure, Bug Bounties and security.txt

Sooner or later you will find a real vulnerability that is not in your lab: a library you use, a site you visit, a device you own. What you do in the next hour decides whether you are a researcher who helped or a suspect. The basic steps (stop, find the contact, report privately, give time, never ask for money in exchange for silence) are in Security Careers & Ethics. This lesson adds the machinery around them: the disclosure models, what a vulnerability disclosure policy and a bug bounty promise you, safe harbour, deadlines, and the security.txt file of RFC 9116, with a validator you can run.

Note: Programme rules and laws differ. A disclosure policy or safe-harbour clause protects you only as far as its words and the law allow; read it before you test, not after.

Three ways to disclose

Model Who learns first When the public learns Risk
Private (vendor only) the vendor maybe never users stay unaware if the vendor sits on it
Coordinated (CVD, "responsible") the vendor, then possibly a coordinator after a fix, or at an agreed deadline the default today
Full (immediate public) everyone, attackers included at once users exposed before any fix; reserved for vendors who ignore reports, and widely criticised

Coordinated vulnerability disclosure (CVD) is what the standards describe: ISO/IEC 29147 covers how vendors receive reports and publish advisories, ISO/IEC 30111 how they handle them internally. When a vendor does not answer, a coordinator helps: a national CERT or CSIRT (in the EU, NIS2 Article 12 makes one CSIRT per member state the coordinator, see UK and EU Law), or CERT/CC in the United States. A CVE ID is assigned by a CVE Numbering Authority (often the vendor itself) so that everyone talks about the same bug.

Policies, bounties and safe harbour

  • A vulnerability disclosure policy (VDP) is a public page that says: we accept reports, here is how, here is what is in scope, here is what you must not do, and here is what we promise in return. No money is involved.
  • A bug bounty is a VDP that pays for valid findings, often run through a platform. Its scope page is your authorisation document: what is listed may be tested in the ways allowed; everything else may not (Authorization, Scope and Rules of Engagement).
  • Safe harbour is the promise inside a policy that the organisation will consider research that follows the rules as authorised, and will not take legal action over it. Good clauses name the laws (for example anti-hacking and anti-circumvention laws) and say the company will make it clear to others that you acted under the policy. Projects such as disclose.io publish standard wording that organisations can adopt.

Safe harbour has limits. A company can only waive its own claims: it cannot bind a prosecutor, another company whose systems you touched, or the law of another country. It covers research that follows the rules: no data exfiltration beyond proof, no denial of service, no social engineering unless allowed, and stopping when you reach personal data.

Deadlines

Most programmes and research teams publish a disclosure deadline: after a fixed time the details are published, fixed or not, which keeps vendors from ignoring reports. Ninety days is a widely used window (Google Project Zero long used it, with seven days for bugs already exploited in the wild), and many add a grace period after a fix so users can update. Deadlines are policies, not laws: they differ by programme, are extended by agreement, and change over time. A small calculator for one such example policy:

python · try it yourself
from datetime import date, timedelta

def plan(reported, fixed=None, exploited=False, extension_days=0):
    window = 7 if exploited else 90                 # an example policy, set by each programme
    deadline = reported + timedelta(days=window + extension_days)
    if fixed and fixed <= deadline:
        publish, why = fixed + timedelta(days=30), "fix + 30 days for users to patch"
    else:
        publish, why = deadline, "deadline reached without a fix"
    return deadline, publish, why

cases = [
    ("fixed in time",       date(2026, 3, 2), date(2026, 4, 20), False, 0),
    ("no fix",              date(2026, 3, 2), None,              False, 0),
    ("extension agreed",    date(2026, 3, 2), date(2026, 6, 10), False, 14),
    ("exploited in wild",   date(2026, 3, 2), None,              True,  0),
]
for label, rep, fix, wild, ext in cases:
    deadline, publish, why = plan(rep, fix, wild, ext)
    print(f"{label:<18} reported {rep}  deadline {deadline}  publish {publish}  ({why})")
fixed in time      reported 2026-03-02  deadline 2026-05-31  publish 2026-05-20  (fix + 30 days for users to patch)
no fix             reported 2026-03-02  deadline 2026-05-31  publish 2026-05-31  (deadline reached without a fix)
extension agreed   reported 2026-03-02  deadline 2026-06-14  publish 2026-07-10  (fix + 30 days for users to patch)
exploited in wild  reported 2026-03-02  deadline 2026-03-09  publish 2026-03-09  (deadline reached without a fix)

Note how the agreed extension moves the deadline but the publication still waits for the fix plus the grace period, and how an exploited bug compresses everything into a week: users need to know so they can defend themselves.

security.txt (RFC 9116)

How does a researcher find the right contact? RFC 9116 (April 2022, an Informational RFC) defines a small text file that an organisation serves at /.well-known/security.txt, over HTTPS, as text/plain in UTF-8. A top-level /security.txt is allowed for older setups; if both exist, the .well-known one wins.

Field Required How many Meaning
Contact yes one or more, in order of preference where to send reports: a mailto:, tel: or https: URI
Expires yes exactly one RFC 3339 date-time after which the file is stale; keep it less than a year ahead
Encryption no any a URI pointing to a key (not the key itself)
Policy no any the disclosure policy
Acknowledgments no any the page thanking researchers
Preferred-Languages no at most one language tags, e.g. vi, en
Canonical no any the URIs where this file is meant to live
Hiring no any security jobs

Lines starting with # are comments, readers ignore fields they don't know, and the file should be signed with an OpenPGP cleartext signature (with Canonical set) so it cannot be quietly replaced. The Expires field exists because abandoned contact addresses are a real problem: a stale file sends reports into a void, or to whoever registered the old domain.

The validator below checks two files: the one an organisation should publish, and one with the usual mistakes. The date is fixed (22 November 2026) so the output is stable; a real checker uses the current time, and also fetches the file over HTTPS and verifies the signature, which this offline example leaves out.

python · try it yourself
import re
from datetime import datetime, timezone

GOOD = """\
# security.txt for shop.lab.test (RFC 9116)
Contact: mailto:security@shop.lab.test
Contact: https://shop.lab.test/security/report
Expires: 2027-06-30T23:59:59Z
Encryption: https://shop.lab.test/.well-known/pgp-key.txt
Policy: https://shop.lab.test/security/policy
Acknowledgments: https://shop.lab.test/security/thanks
Preferred-Languages: vi, en
Canonical: https://shop.lab.test/.well-known/security.txt
"""

BAD = """\
Contact: security@old.lab.test
Expires: 2026-01-31T00:00:00Z
Expires: 2028-01-01T00:00:00Z
Preferred-Languages: en
Preferred-Languages: vi
Contcat: mailto:sec@old.lab.test
Encryption: -----BEGIN PGP PUBLIC KEY BLOCK-----
"""

KNOWN = {"contact", "expires", "encryption", "acknowledgments", "preferred-languages",
         "canonical", "policy", "hiring"}
ONCE = ("expires", "preferred-languages")
URI_FIELDS = {"encryption", "acknowledgments", "canonical", "policy", "hiring"}

def check(text, now, url):
    fields, problems = [], []
    for n, line in enumerate(text.splitlines(), 1):
        if not line.strip() or line.startswith("#"):
            continue
        name, sep, value = line.partition(":")
        if not sep:
            problems.append(f"line {n}: not 'Field: value'")
            continue
        fields.append((n, name.strip().lower(), value.strip()))
    names = [f for _, f, _ in fields]
    for n, f, v in fields:
        if f not in KNOWN:
            problems.append(f"line {n}: unknown field '{f}' (ignored by readers; a typo?)")
        elif f == "contact" and not v.startswith(("mailto:", "tel:", "https://")):
            problems.append(f"line {n}: Contact must be a mailto:, tel: or https:// URI")
        elif f in URI_FIELDS and (not re.match(r"[a-z][a-z0-9+.-]*:", v) or v.startswith("http:")):
            problems.append(f"line {n}: {f} must be a URI (web links with https://)")
    for f in ONCE:
        if names.count(f) > 1:
            problems.append(f"'{f}' appears {names.count(f)} times; at most once")
    if "contact" not in names:
        problems.append("no Contact field (required)")
    exp = [v for _, f, v in fields if f == "expires"]
    if not exp:
        problems.append("no Expires field (required)")
    else:
        when = datetime.fromisoformat(exp[0].replace("Z", "+00:00"))
        days = (when - now).days
        if days < 0:
            problems.append(f"expired {-days} days ago: treat the file as stale")
        elif days > 365:
            problems.append(f"Expires is {days} days away; keep it under a year")
    canon = [v for _, f, v in fields if f == "canonical"]
    if canon and url not in canon:
        problems.append("fetched from a URL that no Canonical field lists")
    return problems or ["OK"]

now = datetime(2026, 11, 22, tzinfo=timezone.utc)
for label, text, url in [("good", GOOD, "https://shop.lab.test/.well-known/security.txt"),
                         ("bad", BAD, "https://old.lab.test/.well-known/security.txt")]:
    print(f"{label}:")
    for p in check(text, now, url):
        print("  -", p)
good:
  - OK
bad:
  - line 1: Contact must be a mailto:, tel: or https:// URI
  - line 6: unknown field 'contcat' (ignored by readers; a typo?)
  - line 7: encryption must be a URI (web links with https://)
  - 'expires' appears 2 times; at most once
  - 'preferred-languages' appears 2 times; at most once
  - expired 295 days ago: treat the file as stale

Every problem in the bad file is common in the wild: a bare e-mail address instead of a mailto: URI, a pasted key instead of a link to it, a typo that silently drops a field, duplicate fields, and an expiry date nobody updated. When you publish one for your own service, put the Expires renewal into the same calendar as your certificate renewals.

Writing the report

A good report is short and reproducible: affected product and version or URL, the class of weakness (a CWE if you know it), the steps to reproduce with the minimum data needed, the impact in one paragraph, and a suggested fix. Say what you did not do ("I did not access other users' data beyond the one record shown"). Keep a dated log of every message: if things go wrong, it shows you acted in good faith.

Pitfalls

  • Testing first, reading the policy later. The policy is the permission. Without one, stop at discovery and report through a coordinator.
  • Proving too much. Downloading the database "to show impact" turns a finding into a breach. One record, redacted, is enough.
  • Asking for money. A bounty is paid under the programme's rules. "Pay me or I publish" is extortion, a crime everywhere these lessons cover (the CFAA names it directly in § 1030(a)(7), and the DOJ policy excludes it explicitly).
  • Trusting a stale security.txt. If it has expired or its Canonical does not match the URL you fetched it from, look for another contact.

Practice

  1. Write a security.txt for a service you run (or for shop.lab.test) and run it through the validator. Then change the Expires to two years ahead and check the warning.
  2. A vendor acknowledges your report on day 5, asks for a 30-day extension on day 80 and ships the fix on day 115. Using the calculator's policy, when is the publication?
  3. You find that a smart plug you own sends its Wi-Fi password in cleartext to the vendor's cloud. The vendor has no security.txt and no VDP. What are your options?
Answers
  1. With Expires two years ahead the validator reports "Expires is ... days away; keep it under a year".
  2. The deadline moves from day 90 to day 120, the fix on day 115 is in time, so publication is day 145 (fix + 30 days), if both sides agree on that grace period.
  3. Look for a security contact on the vendor's site or in its app, try a support channel asking for the security team (without details), and if that fails within a reasonable time, report through a coordinator such as your national CERT/CSIRT. Testing only the device you own, on your own network, keeps the research itself clean; check that the device's licence terms and your local law allow the analysis.

Test yourself

Which two fields does RFC 9116 require in a security.txt file?

  1. Contact and Encryption
  2. Contact and Expires
  3. Policy and Canonical
  4. Expires and Hiring

Where should a website serve its security.txt?

  1. /robots.txt
  2. /.well-known/security.txt over HTTPS
  3. In the HTML <head>
  4. Only in DNS

What does a safe-harbour clause in a bug-bounty policy NOT do?

  1. Promise the company won't sue you for research within the rules
  2. Treat in-scope research as authorised
  3. Bind prosecutors and third parties whose systems you touched
  4. Explain the rules you must follow

Why does coordinated disclosure usually have a deadline, even when the vendor has not fixed the bug?

  1. To punish the vendor
  2. So reports are not ignored indefinitely and users eventually learn of the risk
  3. Because the law requires 90 days
  4. To help attackers