Your AI builder adds a contact form to your site. It sends an email to you when someone fills it in. Nice and simple.
A month later your sending provider emails you: your account is flagged for spam. Or your inbox holds 4,000 messages about cheap watches. Or your domain's mail stops reaching anyone.
Why it happens
A form that sends email is an open door unless you limit it. Bots find forms and fill them in all day. Two things go wrong:
- The bots fill your form with spam, and you pay for every message sent and read.
- If the form lets the visitor control the recipient or the subject, the bot can use your server to send mail to other people. Your domain then gets the blame.
How to check your own app
- Open your contact form and look at the network request it sends. What fields go to the server?
- Is the recipient address set on the server, or is it a field in the request? It should never be in the request.
- Send ten submissions quickly from your own browser. Do you hit any limit?
- Put a line break in the subject or name field and see what the email looks like. Extra headers or a second recipient mean the form can be abused.
- Check what the form does with the message: does it send a copy to the visitor? A form that emails whatever address the visitor types is a way to send mail from your domain to strangers.
What to look for
- Recipient, sender or subject taken straight from the request.
- No rate limit and no bot check.
- A confirmation email sent to any address typed into the form.
- The mail API key used in code that runs in the browser.
How to fix it
- Hard-code the recipient on the server. Take only the visitor's name, reply-to address and message from the form.
- Strip line breaks from every field that ends up in an email header.
- Add a rate limit per address and a bot check such as an invisible challenge.
- If you send a confirmation, send it only after the visitor proves the address, or skip it.
- Keep the mail provider key on the server and set a daily sending cap at the provider.
A prompt you can paste into your AI builder
"Review every form in this project that sends an email. Make the recipient address a server-side constant. Take only name, reply-to email and message from the request, and strip line breaks from any value used in an email header. Add a rate limit per IP address and per email address, and a bot check. Make sure the mail provider key is only used on the server, and show me where I can set a daily sending cap."
What a scanner can and cannot tell you
An outside scan can see that a form exists on a public page. It does not submit forms, so it cannot tell you whether the form can be abused. Test your own form as above.
I work on ProofForge. The free scan covers what a visitor can see and says plainly what it could not check.
Check your own app from the outside, free. Run the free ProofForge scan on your live URL. No account needed for the first scan. It looks at your public site the way a stranger would and says pass, fail or inconclusive, so you know what is confirmed and what it could not see. One-time reports start at $9: see pricing. Building with an AI agent? There is an MCP server so it can check before it deploys.
Top comments (0)