XSS Explained with React and Vanilla JS Examples | Cross Site Scripting | dangerouslySetInnerHTML @CodingGarden
XSS Explained with React and Vanilla JS Examples | Cross Site Scripting | dangerouslySetInnerHTML  @CodingGarden
Uploaded January 2024 | Updated November 2026, 1 day ago
In this video, I talk about the basics of Cross Site Scripting (XSS), how to exploit it and how to prevent it.

See all of the notes and code from this stream here: github.com/CodingGarden/learning-to-hack/tree/main/xss

This is a highlight of a livestream. Watch the full stream here: youtube.com/watch?v=240QqnfskC4

XSS on Wikipedia: en.wikipedia.org/wiki/Cross-site_scripting
XSS on OWASP: owasp.org/www-community/attacks/xss
XSS on Snyk.io: learn.snyk.io/lesson/xss
Play the XSS Game: xss-game.appspot.com

00:00 Welcome
00:22 What is XSS?
01:04 First Look at XSS
01:38 Why this is BAD
02:53 Reflected XSS
03:13 Stored XSS
03:54 Real World XSS
05:05 Twitter XSS Explained
05:34 Blind XSS
06:12 Vulnerable Code with innerHTML
07:51 Safe Code with textContent
08:58 Sanitizing HTML with a custom function
11:50 Safe Code with DOMPurify
14:09 Never Trust User Provided Input
15:16 Preventing XSS Summary
16:24 Fixing Attribute Injection
18:04 This scares me
18:33 XSS in React
19:41 dangerouslySetInnerHTML in React
21:00 Trust no one
21:44 DOMPurify with React
23:04 XSS Brain Implant
23:52 XSS for Backend Devs
24:36 Scanners and Static Code Analysis
25:00 Conclusion / Summary

📩 Sign up for my mailing list: https://list.coding.garden/
💖 Donate: https://coding.garden/donate
😍 Pledge: https://coding.garden/pledge
🎉 Stickers: https://coding.garden/stickers
💻 Gear List: https://coding.garden/gear
🔎 Search for more Coding Garden videos here: https://coding.garden/videos
🗣 View the Coding Garden FAQ here: github.com/CodingGarden/faqs
XSS Explained with React and Vanilla JS Examples | Cross Site Scripting | dangerouslySetInnerHTMLBuilding with Deno v2 | Creating Vector Embeddings | YouTube Subtitle Search Tool | Part 3CODE Q&A - Whats the real world like? Do you need a portfolio? How do you manage projects? And more!I integrated Auth.js with SvelteKit and Prisma  - listd devlog - 2023-02-10🤓✌️ Working on a Reddit Client with the Vue 3 Composition API | Part 2Building a lichess.org chess bot to play chess with twitch chatI Setup Tailwind and Skeleton UI in SvelteKit - listd devlog - 2023-01-20Part 2 - Using .NET 5 + C# to Build a CRUD API on a Mac | MSSQL + Entity  Framework + SwaggerRUNES - Coming in Svelte v5 | My TakeProgramming and Tech News | 2023-01-02 | A View from the Garden - Episode 0Learning Next.js 13 Beta - Part 5 - Zod Types and Serialization - Travel Log⚔️ Playing CLASH OF CODE with viewers | Monday September 14th
Coding Garden |

XSS Explained with React and Vanilla JS Examples | Cross Site Scripting | dangerouslySetInnerHTML

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER