security.txt and handling vulnerability reports for your own app
Someone who finds a security problem in your site or app needs an address to report it to. Without one, the report goes to a general inbox, or the finder posts it publicly. A security.txt file names the address, and a short process turns the report into a fix.
The security.txt file
RFC 9116 (April 2022) defines a plain text file at a fixed path:
https://example.com/.well-known/security.txt
It must be served over HTTPS with Content-Type: text/plain; charset=utf-8. A file at /security.txt is allowed for older tools, but the one under /.well-known/ wins. Each file applies only to the host it is served from, not to subdomains.
A minimal file:
Contact: mailto:security@example.com
Expires: 2027-11-30T23:00:00Z
Preferred-Languages: en, de
Policy: https://example.com/security-policy
Canonical: https://example.com/.well-known/security.txt
The fields:
| Field | Required | Meaning |
|---|---|---|
Contact |
yes, at least one | mailto:, tel: or an https:// URL of a form |
Expires |
yes, once only | date after which the file should not be trusted; the RFC recommends less than a year ahead |
Encryption |
no | a link to your OpenPGP key (never the key itself) |
Policy |
no | your disclosure policy |
Acknowledgments |
no | a page thanking reporters |
Preferred-Languages |
no | languages you read |
Canonical |
no | the URLs where this file is published |
Hiring |
no | security jobs |
All web URLs in the file must start with https://. The RFC recommends signing the file with an OpenPGP cleartext signature. Put a reminder in your calendar a month before Expires: an expired file tells researchers the contact may be dead.
Serve it
nginx
location = /.well-known/security.txt {
alias /var/www/security.txt;
default_type text/plain;
charset utf-8;
}
Caddy
handle /.well-known/security.txt {
root * /var/www
rewrite * /security.txt
header Content-Type "text/plain; charset=utf-8"
file_server
}
Check it
curl -s -D - https://example.com/.well-known/security.txt | grep -i -E '^(content-type|contact|expires)'
content-type: text/plain; charset=utf-8
Contact: mailto:security@example.com
Expires: 2027-11-30T23:00:00Z
Send a test mail to the contact address from an outside account, and check that it does not land in a spam folder.
A disclosure policy in five sentences
The Policy page says:
- how to report (the contact, what to include: steps to reproduce, affected URL or version);
- what you will do: acknowledge within a few working days and keep the reporter informed;
- what is out of scope (denial of service tests, social engineering, accounts of other users);
- that you will not take legal action against good-faith research within these rules;
- whether you pay rewards (it is fine to say no) and whether you credit reporters.
Handling a report
Acknowledge
Reply within a few days, even if only to say that the report arrived. A reporter who hears nothing does not have a reason to wait before publishing.
Reproduce and assess
Can you trigger it, what can an attacker do with it, and who is affected? Write the assessment down as a CVSS vector, even if you do not publish it.
Check for use
If the bug could have been used against your users, look at the logs for signs of it. If data may have been exposed, the reporting duties in the first hour of a security incident can apply.
Fix, then publish
Agree a disclosure date with the reporter. Release the fix, then publish what was wrong, which versions are affected, which version fixes it and who reported it.
Do not threaten the reporter
Asking a reporter to keep quiet until a fix exists is fair. A legal threat is not, and it tends to become the news.
When to request a CVE
A CVE ID helps when other people run your software: a library, a self-hosted app, a plugin. Their scanners can only warn them about a bug that has an ID. A bug in a website that only you operate does not need a CVE.
Where to get one:
- In a GitHub repository, create a draft security advisory (Security tab) and request a CVE from it. GitHub is a CNA and assigns the ID. The advisory also goes into the GitHub Advisory Database, which dependency scanners read.
- Many larger projects and vendors have their own CNA. Ask that CNA.
- Otherwise, request one from MITRE through the CVE request form at
https://cveform.mitre.org/.
What is a CVE explains CNAs and records.
Sources
- RFC 9116: A File Format to Aid in Security Vulnerability Disclosure (location, HTTPS, content type, scope, fields, Expires recommendation, signing)
- GitHub: privately reporting a security vulnerability and repository security advisories
- CVE Program: request a CVE ID
- nginx and Caddy configurations and the
curlcheck tested with nginx 1.26.3 and Caddy 2.6.2 indebian:trixie-20261123-slimon 2026-11-26
Check your servers every day
The Vulnpocalypse collector reports the packages and settings of a server once a day, and the digest lists what to fix, most urgent first.
Vulnpocalypse