Why security.txt matters under the CRA
Annex I, Part II of the Cyber Resilience Act asks manufacturers to publish a contact address for vulnerability reports and to have a coordinated vulnerability disclosure policy. A security.txt file (RFC 9116) is the standard, machine-readable way to do the first part, and it points to the second.
It is also the first thing a researcher looks for. Without it, reports end up in your sales inbox, on social media or nowhere. With the 24-hour reporting clock that applies since 11 September 2026, you want to hear about problems as early as possible. More on that in CRA Article 14 reporting.
What each field means
RFC 9116 defines eight fields. Two are required; the rest are optional, and each may appear once except Contact, Encryption, Acknowledgments, Canonical, Policy and Hiring, which may repeat.
- Contact (required): where to send a report. A
mailto:address, anhttps://form or page, or atel:number. With several, list them in order of preference: researchers try the first one first. - Expires (required): the date after which the file should not be trusted, in ISO 8601 with a time zone, such as
2027-11-03T23:59:59Z. The RFC recommends less than a year ahead, so a forgotten file goes stale instead of pointing at an inbox nobody reads. - Encryption: a link to your public key, for reports that should not travel in plain text. The key itself never goes in the file.
- Policy: your vulnerability disclosure policy. Say what is in scope, how fast you answer, whether you allow testing and how you credit people.
- Acknowledgments: a page thanking people who reported issues. Cheap, and researchers notice.
- Preferred-Languages: the languages you read reports in, as a comma-separated list of language tags, such as
en, pt. - Canonical: the URL where this file lives. It lets a reader of a signed copy check it was meant for your domain, not copied from another site.
- Hiring: your security jobs page, if you have one.
A complete example
A small vendor with one product, an email address for reports and a policy page would publish this:
Contact: mailto:security@example.com
Contact: https://example.com/security/report
Expires: 2027-10-31T23:59:59Z
Encryption: https://example.com/pgp-key.txt
Policy: https://example.com/security-policy
Acknowledgments: https://example.com/security/thanks
Preferred-Languages: en, pt
Canonical: https://example.com/.well-known/security.txt
Order does not matter to parsers, but people read the file too, so keep the contacts at the top. Lines starting with # are comments.
Mistakes the generator catches, and some it cannot
- No Contact, or a bare address.
security@example.comwithoutmailto:is not a valid URI, and strict parsers skip it. - An http:// link. Every web URL in the file must be HTTPS, or a reader cannot trust what it points to.
- Expires more than a year away, or already past. A past date tells tools to ignore the whole file.
- The wrong place. The file belongs at
/.well-known/security.txt. RFC 9116 allows/security.txtat the root for older tools, ideally as a redirect to the main file, but a file only there is easy to miss. - An HTML page instead of the file. Some frameworks answer unknown paths with the home page and a 200. Check the response, not only the status.
- An inbox nobody reads. The generator cannot check this one. Send a test report to each Contact after publishing, and put a reminder in your calendar a month before Expires.
Check it after you deploy
curl -sI https://example.com/.well-known/security.txt
curl -s https://example.com/.well-known/security.txt
The first command should show HTTP/2 200 and content-type: text/plain; charset=utf-8, with no redirect to another domain. The second should print the file exactly as generated. If you signed it, gpg --verify security.txt on the downloaded copy should report a good signature from your key.
This guide explains the regulation in plain terms. It is not legal advice. For decisions about your obligations, speak to a qualified adviser.