Blog · November 19, 2026
Can a user's comment run code in your app?
If your app shows text that users type, like comments, bios, or chat messages, check how it shows them.
If your app shows text that users type, like comments, bios, or chat messages, check how it shows them. AI tools sometimes render that text as raw HTML so links or bold text work. In React, look for dangerouslySetInnerHTML. In other code, look for innerHTML or v-html.
The risk: someone can save a comment with a hidden script inside. Then the script runs in the browser of every person who views it. It can act as them inside your app. This is called cross-site scripting (XSS).
How to check:
- Search your code for those three words.
- Ask if the content can come from a user.
To fix it, ask your AI tool: "Show user text as plain text. If we need formatting, clean the HTML with a sanitizer like DOMPurify first."
VibeVigil scans your live app for common security gaps. Try it free: https://vibevigil.com
A short note. Not a promise.
If you want to know about your own site, run the free scan.
Scan a site you own. It is free. No account.
You see the report first. Saving the site is optional.