Skip to content

DEF CON 34 talks are here: 354 talks, summarized and searchable.

Browse DEF CON 34

Enhancing ReactJS Application Security: XSS Scripting and Client-Side Defense

Jim Manico

AppSecTalks59 minIntermediateOpen on YouTube ↗

Where

Talks
LASCON 2023

Duration

59 min

Surveys XSS and client-side defenses for ReactJS apps, plus API, token and access control risks developers face.

Summary

The talk opens with where security bugs come from in modern software: developer-written code, third-party libraries, and cloud configuration. The speaker argues for security gates in the devops pipeline, automated testing on every commit, requirements tailored to each team from the ASVS, and threat modeling generated from API traffic rather than whiteboard interviews.

The middle section is a broad tour of web and API defenses. Topics include session cookies and security headers, sandboxed iframes, CORS behavior once applications move to microservices, REST pitfalls such as sensitive data in URLs, server-side request forgery, JSON parsing and deserialization, JWT signature checks and token revocation, SQL injection through input that passes validation, CSRF, file upload handling, prompt injection in LLM applications, and the OWASP Top 10. Broken access control is highlighted as a business logic gap that common scanners miss.

For ReactJS specifically, the focus is cross-site scripting. The talk recommends context-appropriate output escaping, a sanitizer such as DOMPurify for user-authored HTML, and validating URL protocols before rendering links, since JavaScript URLs can bypass React's protections. The takeaway is that client-side code needs its own defenses, and that authorization checks belong in the data layer rather than in hardcoded roles.

Related talks