𝗥𝗲𝗮𝗰𝘁 𝘃𝘀. 𝗫𝗦𝗦: 𝗪𝗵𝗲𝗿𝗲 𝘁𝗵𝗲 𝗚𝘂𝗮𝗿𝗱𝗿𝗮𝗶𝗹𝘀 𝗘𝗻𝗱

React is secure by default. It escapes values in JSX to stop most script injections. But this creates a false sense of security. React reduces XSS risk. It does not end it.

There are three main types of XSS attacks:

What does React actually protect you from?

React provides escape hatches. If you use them wrong, you create vulnerabilities.

Watch out for these mistakes:

React provides the tools for security. You must use them correctly. Security is your responsibility.

Source: https://dev.to/ayomidejhay/react-vs-xss-where-the-guardrails-end-6p2