Skip to content

security.txt: a simple file that tells researchers how to report a vulnerability

RFC 9116 defines a security.txt file served at /.well-known/security.txt. The fields to include, an example, and why it matters before the CRA.

Published by Contextingo.

When someone finds a security problem in your service, they need to know whom to tell. security.txt is a small text file at a known location that answers that question. It is defined in RFC 9116.

Where it lives

At /.well-known/security.txt on your domain, served over HTTPS.

Example

Contact: mailto:security@example.com
Expires: 2027-06-30T00:00:00Z
Preferred-Languages: en
Canonical: https://example.com/.well-known/security.txt
Policy: https://example.com/security

Fields

  • Contact (required): an address or URL. It may appear more than once.
  • Expires (required): when the file should no longer be trusted. Keep it current.
  • Optional: Encryption, Acknowledgments, Preferred-Languages, Canonical, Policy, Hiring.

Process behind the file

  1. Make sure the mailbox is read.
  2. Confirm receipt within a few days.
  3. Triage, fix, and tell the reporter.
  4. Say what you expect from reporters, and do not threaten them.

Vulnerability handling becomes a legal duty for many products in the EU, see the Cyber Resilience Act.

Source

Questions

Good to know.

Is the Expires field required?

Yes. RFC 9116 requires Contact and Expires.

Should I sign the file?

Signing is recommended by the RFC but optional.

Nothing learned is lost. Nothing unchecked is done.