Cursor security

HTML Escaping Removed, Creating XSS Vulnerability

After Cursor refactored your template rendering code, HTML escaping was removed or disabled. User input is now rendered as HTML instead of being escaped, creating an XSS vulnerability.

Any user-supplied content could run malicious scripts.

Error Messages You Might See

Script tag executed in user content JavaScript injected Cookie/token stolen Unexpected script execution
Script tag executed in user contentJavaScript injectedCookie/token stolenUnexpected script execution

Common Causes

  1. HTML escaping disabled with dangerouslySetInnerHTML or v-html
  2. innerHTML used instead of textContent
  3. Template escaping turned off
  4. User input rendered without sanitization
  5. Third-party HTML inserted without validation

How to Fix It

Always escape user input in templates. React escapes by default (good). Never use dangerouslySetInnerHTML with user data. Sanitize with DOMPurify if HTML needed. Use Content Security Policy header. Validate and filter input server-side.

Real developers can help you.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

How do I safely render user HTML?

Sanitize with DOMPurify: DOMPurify.sanitize(userHtml). Removes dangerous tags/attributes. Better than escaping.

What's Content Security Policy?

HTTP header that restricts script sources. Prevents inline scripts, external scripts not from whitelist. Protects against XSS.

Related Cursor Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help