security.txt: the five-line file that lets a researcher warn you

security.txt is a plain text file at /.well-known/security.txt that says where to report a security problem on your site. It is defined by RFC 9116, published in April 2022. Two fields are required: Contact and Expires. For a solo maker it takes ten minutes, and it is the difference between a private email from the person who found your open table and no warning at all.

The team behind Keybrum's attacksUpdated 8 min read

In short

  • The file lives at https://yourdomain.com/.well-known/security.txt, served over HTTPS as text/plain.
  • Contact and Expires are the only required fields. RFC 9116 recommends an Expires date less than a year away.
  • The file covers only the exact domain it is served from. A subdomain such as app.yourdomain.com needs its own copy.
  • It is a way to reach you. It does not give anyone permission to test your app, and the RFC says so.
  • A mailbox you read matters more than any optional field. An address nobody opens is worse than no file.
On this page

What is security.txt?

security.txt is a small text file that answers one question: if someone finds a security problem on this site, who do they tell? It sits at a fixed address, so a person or a tool can find it without searching your footer, your GitHub profile or your social accounts.

The format is described in RFC 9116, "A File Format to Aid in Security Vulnerability Disclosure", published in April 2022. It is an Informational RFC: a documented convention, with no obligation attached. The file is a list of Field: value lines, one per line, in UTF-8. Lines that start with a hash sign are comments.

Big companies use it to route reports to a security team. A solo maker has no security team, which is exactly why the file helps: the only person who can fix the problem is you, and the reporter has to find you first.

Why a solo maker should care

Most leaks in small products are found by someone who was not looking for trouble: a curious user, a developer reading your JavaScript, a researcher scanning a whole category of apps. The public cases follow that pattern. Wiz found the Moltbook database open and reported it to the maintainer, and the team closed it within hours. The scan behind CVE-2025-48757 covered 1,645 apps and found 170 with tables that strangers could read or write. A report like that only helps the owners who can be reached.

Picture the person who has just seen that your profiles table answers anyone. They have three choices: write to you, say nothing, or post about it. A contact address at a known place makes the first choice the easy one. Without it, a careful reporter may spend a few minutes looking for an email, find a contact form that asks for a company name, and give up.

The fields, and which ones you need

FieldRequiredWhat it holds
ContactYesWhere to report: a mailto: address, a web form URL or a phone number. You can list several, in order of preference.
ExpiresYes, once onlyThe date after which the file should be considered stale, in ISO 8601 format. The RFC recommends less than a year in the future.
CanonicalNoThe URL or URLs where this file lives. If the file was fetched from an address that is not listed, its content should not be trusted.
Preferred-LanguagesNo, once onlyLanguages you can read reports in, such as en, fr.
PolicyNoA link to your disclosure policy: what you ask of reporters and what they can expect from you.
EncryptionNoA link to a public key for encrypted reports.
AcknowledgmentsNoA link to a page that thanks past reporters.
HiringNoA link to security job openings.
Fields defined by RFC 9116. Field names are not case sensitive.

For a product run by one person, Contact, Expires, Canonical and Preferred-Languages are enough. Add Policy when you have written two paragraphs about how you handle reports. Skip Encryption unless you already use PGP and will really decrypt a message when it arrives.

A security.txt example to paste

Replace the domain and the address, and set Expires to a date about eleven months from today. Put the date in your calendar.

text
# Report a security problem with example.com
Contact: mailto:[email protected]
Expires: 2027-10-01T00:00:00.000Z
Canonical: https://example.com/.well-known/security.txt
Preferred-Languages: en
A complete, valid security.txt. The first line is a comment.

Use an address that lands in a mailbox you read every day. A security@ alias that forwards to your main inbox is fine. Do not use a no-reply address or a form that requires an account. If you prefer not to publish an email, a URL to a simple form works as a Contact value too.

The RFC recommends signing the file with an OpenPGP cleartext signature, so a reader can tell it was not altered. For a small product this is optional. An unsigned file with a working address does the job.

Where the file goes on common stacks

The address is /.well-known/security.txt. The RFC also allows a copy or a redirect at /security.txt for older tools, and says the .well-known location wins if both exist. It must be reachable over HTTPS and served with the content type text/plain.

  1. 1

    Next.js, Vite, Astro and most frontend frameworks

    Create the folder public/.well-known/ and put security.txt in it. Static files in public are served at the root of the site, so the file appears at the right address on the next deploy.

  2. 2

    App builders such as Lovable, Bolt or v0

    Ask the builder to add a static file at public/.well-known/security.txt with the content above. Then check the deployed address yourself, because some single-page setups answer every unknown path with the app's HTML.

  3. 3

    A server you run

    Serve the file as a static asset from your web server, with the .well-known path allowed. Some default configurations block folders that start with a dot.

  4. 4

    Each domain and subdomain

    The RFC limits the file to the exact domain it was fetched from. If your landing page is on example.com and the app on app.example.com, publish the file on both and list both URLs in Canonical.

How to check your security.txt

One command shows the status, the content type and the body. Run it against your own domain after the deploy.

bash
curl -si https://example.com/.well-known/security.txt
You want HTTP 200, content-type: text/plain, and your five lines.
  • The status is 200, with no redirect to a login page
  • The content type is text/plain. If you see text/html, your app is answering with its own page and the file is not really there
  • Contact is present and the address works: send it a test email
  • Expires is in the future and less than a year away
  • Canonical matches the address you just requested
  • The same check passes on every subdomain that serves a part of your product

The text/html case is the most common mistake on single-page apps. The router catches the path, returns the app shell with a 200 status, and everything looks fine in a browser tab that shows a blank page. The curl -si output makes it obvious.

What to do when a report arrives

The file only helps if the first report gets a good answer. A short routine is enough.

  1. Reply within a day. Thank the person and say you are looking into it. Silence is what turns a private report into a public post.
  2. Reproduce it on your own app. Ask for the request that worked if it is not in the report. Do not ask the reporter to test further.
  3. Fix, then confirm. The same request has to fail afterwards. The guide on what to do when your app is hacked covers containment and who to tell if data was read.
  4. Tell the reporter it is fixed. Offer a mention if they want one. You do not owe a payment unless you promised one.

Be careful with messages that demand money before sharing any detail. A genuine report describes the problem well enough for you to check it. You can answer politely that you do not run a paid programme and that you welcome the details.

The mistakes that make the file useless

  • An expired date. The RFC says the file should not be used after its Expires date. Renew it once a year.
  • A dead mailbox. The alias was never created, or it forwards to an address you left. Test it after every change of email provider.
  • Only on the marketing site. The app, the API and the docs are on other subdomains and have no file.
  • Blocked by your own rules. A firewall rule, a bot filter or a dot-folder rule returns 403 for /.well-known/.
  • A promise you cannot keep. A Policy page that offers rewards or response times you will not honour creates the conflict the file was meant to avoid.

What Keybrum does here, and what it does not

Keybrum does not read, grade or require your security.txt. None of its attacks looks at the file, so a run will not tell you whether yours is valid. Use the curl above for that. For transparency, Keybrum publishes its own at keybrum.com/.well-known/security.txt.

What Keybrum does is the other half of the problem: finding what a stranger would report before a stranger does. It attacks your live app as an anonymous visitor and as two signed-in users. It asks your tables and storage for rows with only the public key, looks for working API keys in the JavaScript bundle, tries to read one user's data from another account, calls AI routes without a session, and sends a forged unsigned event to webhook routes. Each finding comes with the request that worked and the fix for your coding agent. The vibe coding security checklist lists the same places if you prefer to check by hand first.

It only attacks apps whose owner has proved ownership. A one-time report costs €49. The Maker plan, €29 a month excluding VAT for 5 apps, attacks again on every deploy.

Questions

Where do I put security.txt?

At https://yourdomain.com/.well-known/security.txt. In most frontend frameworks that means a file at public/.well-known/security.txt. RFC 9116 also allows a copy or redirect at /security.txt for older tools, but the .well-known location is the one that counts.

Is security.txt mandatory?

No. RFC 9116 is an Informational document that describes a convention. Nothing forces a site to publish the file.

Which fields are required in security.txt?

Contact and Expires. Contact can appear several times, in order of preference. Expires must appear exactly once, and the RFC recommends a date less than a year in the future.

Does security.txt allow people to hack my site?

No. The RFC says the presence or absence of the file should not be taken as permission or refusal for security testing. If you want to authorise testing under conditions, write that in a policy page and link it with the Policy field.

Do I need a bug bounty to publish security.txt?

No. The file only says how to reach you. Most small products that publish one offer thanks and a quick fix, and that is a reasonable position for a solo maker.

Does Keybrum check my security.txt?

No. Keybrum's attacks test what a stranger can read, write or spend on your live app, and none of them inspects the file. Check it yourself with curl -si on the .well-known address.

Sources

  1. 1.RFC 9116: A File Format to Aid in Security Vulnerability Disclosure, RFC Editor
  2. 2.security.txt, securitytxt.org
  3. 3.Hacking Moltbook: AI Social Network Reveals 1.5M API Keys, Wiz Research
  4. 4.Statement on CVE-2025-48757, Matt Palmer

Your app is public. So are its mistakes.

Check what any attacker can already see in it, free, in ten seconds. The full attack, with proof and fixes: €49 once, or €29 a month on a plan.

or continue with Google or GitHub