Introduction
Website with the collection of all the cheat sheets of the project.
Authentication
Website with the collection of all the cheat sheets of the project.
Content Security Policy
With all that being said, CSP should not be relied upon as the only defensive mechanism against XSS. You must still follow good development practices such as the ones described in Cross-Site Scripting Prevention Cheat Sheet, and then deploy CSP on top of that as a bonus security layer.
Cross-Site Request Forgery Prevention
See the OWASP XSS Prevention Cheat Sheet for detailed guidance on how to prevent XSS flaws.
🌐
OWASP Cheat Sheet Series
cheatsheetseries.owasp.org › cheatsheets › XSS_Filter_Evasion_Cheat_Sheet.html
XSS Filter Evasion - OWASP Cheat Sheet Series
The very first OWASP Cheat Sheet, Cross Site Scripting Prevention, was inspired by RSnake's work and we thank RSnake for the inspiration! This cheat sheet demonstrates that input filtering is an incomplete defense for XSS by supplying testers with a series of XSS attacks that can bypass certain ...
Discussions

XSS (Cross Site Scripting) Prevention Cheat Sheet
I can't believe this bullshit; is this how proggit has evolved? Into a play pen for code monkeys with their HURR DURR ESCAPE DATA IS HARD DURR CHEAT SHEET! Can I get a mother fucking curry-howard isomorphism up in this bitch?! More on reddit.com
🌐 r/programming
36
101
March 22, 2009
20 Point List for Preventing Cross-Site Scripting (XSS) in PHP
I like how their article picture is a SQL injection not a XSS. More on reddit.com
🌐 r/PHP
34
68
April 22, 2013
Recommended books or resources on XSS & SQL injection?
Google has a great interactive tutorial for beginners on XSS, SQL injection and more. More on reddit.com
🌐 r/netsec
8
6
August 29, 2010
OWASP Cheat Sheet
🌐 r/cybersecurity
2
152
July 18, 2021
🌐
GitHub
github.com › OWASP › CheatSheetSeries › issues › 1891
Update: Cross Site Scripting Prevention Cheat Sheet (XSS) - Add Trusted Types · Issue #1891 · OWASP/CheatSheetSeries
November 13, 2025 - What is missing or needs to be updated? Trusted types seem to be a modern way/approach to finally getting rid of such XSS vulnerabilities and preventing them. It#s not mentioned (yet) at all, in th...
Author   rugk
🌐
OWASP
cheatsheetseries.owasp.org › index.html
Introduction - OWASP Cheat Sheet Series
The OWASP Cheat Sheet Series was created to provide a concise collection of high value information on specific application security topics.
🌐
Reddit
reddit.com › r/programming › xss (cross site scripting) prevention cheat sheet
r/programming on Reddit: XSS (Cross Site Scripting) Prevention Cheat Sheet
March 22, 2009 - [OWASP CSRF] - Correct implementation of a "User interaction based CSRF defense" approach? r/webdev • · comments · Cross-site scripting (XSS) cheat sheet · r/xss • · upvotes · · comment · A Hitchhiker’s Guide to Cross-Site Scripting (XSS) in PHP (Part 1): How Not To Use Htmlspecialchars() For Output Escaping | Pádraic Brady ·
🌐
OWASP Cheat Sheet Series
cheatsheetseries.owasp.org › cheatsheets › DOM_based_XSS_Prevention_Cheat_Sheet.html
DOM based XSS Prevention - OWASP Cheat Sheet Series
This cheatsheet addresses DOM (Document Object Model) based XSS and is an extension (and assumes comprehension) of the XSS Prevention Cheatsheet.
🌐
PortSwigger
portswigger.net › web-security › cross-site-scripting › cheat-sheet
Cross-Site Scripting (XSS) Cheat Sheet - 2026 Edition | Web Security Academy
Interactive cross-site scripting (XSS) cheat sheet for 2026, brought to you by PortSwigger. Actively maintained, and regularly updated with new vectors.
Find elsewhere
🌐
OWASP Cheat Sheet Series
cheatsheetseries.owasp.org › cheatsheets › HTTP_Headers_Cheat_Sheet.html
HTTP Headers - OWASP Cheat Sheet Series
The Content-Type representation header is used to indicate the original media type of the resource (before any content encoding is applied for sending). If not set correctly, the resource (e.g. an image) may be interpreted as HTML, making XSS vulnerabilities possible.
🌐
OWASP Foundation
owasp.org › www-community › attacks › xss
Cross Site Scripting (XSS) | OWASP Foundation
The primary defenses against XSS are described in the OWASP XSS Prevention Cheat Sheet.
🌐
OWASP Juice Shop
pwning.owasp-juice.shop › companion-guide › latest › part2 › xss.html
Cross Site Scripting (XSS) :: Pwning OWASP Juice Shop
1. https://owasp.org/www-community/attacks/xss/ 2. https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP · 3. https://owasp.org/www-project-cheat-sheets/cheatsheets/Input_Validation_Cheat_Sheet · 4. https://wiki.owasp.org/index.php/Testing_for_DOM-based_Cross_site_scripting_(OTG-CLIENT-001) 5.
🌐
Blogger
nickcoblentz.blogspot.com › 2009 › 01 › owasps-xss-prevention-cheat-sheet.html
Nick Coblentz: OWASP's XSS Prevention Cheat Sheet
January 23, 2009 - The Open Web Application Security Project (OWASP) has recently released a XSS (Cross Site Scripting) Prevention Cheat Sheet. This cheat sheet helps developers identify how and when to output encode or escape untrusted user data when including it within a page.
🌐
GitHub
gist.github.com › sseffa › 11031135
xss-owasp-cheatsheet · GitHub
xss-owasp-cheatsheet · Raw · xss-owasp-cheatsheet · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below.
🌐
OWASP Cheat Sheet Series
cheatsheetseries.owasp.org › cheatsheets › Laravel_Cheat_Sheet.html
Laravel - OWASP Cheat Sheet Series
Laravel also offers displaying unescaped data using the unescaped syntax {!! !!}. This must not be used on any untrusted data, otherwise your application will be subject to an XSS attack.
🌐
Jcarpizo
jcarpizo.github.io › owasp-info › cheatsheets › Cross_Site_Scripting_Prevention_Cheat_Sheet.html
Cross Site Scripting Prevention · OWASP Cheat Sheet Series
Both reflected and stored XSS can be addressed by performing the appropriate validation and escaping on the server-side. DOM Based XSS can be addressed with a special subset of rules described in the DOM based XSS Prevention Cheat Sheet.
🌐
PortSwigger
portswigger.net › research › one-xss-cheatsheet-to-rule-them-all
One XSS cheatsheet to rule them all | PortSwigger Research
September 4, 2020 - IE also has the ondeactivate and onbeforedeactivate events, in order to automatically execute these events you need to modify the hash twice as autofocus won't work in IE when the first element is focused.<a ondeactivate=alert(1) id=x tabindex=1></a><input id=y autofocus> <xss ondeactivate=alert(1) id=x tabindex=1></xss><input id=y autofocus> <a onbeforedeactivate=alert(1) id=x tabindex=1></a><input id=y autofocus> someurl.php#x someurl.php#y · Finally here is a Chrome specific vector that works inside SVG:<svg><discard onbegin=alert(1)> There are many more vectors in the cheatsheet; I just chose the most interesting for the blog post.
🌐
Semgrep
semgrep.dev › blog › 2021 › xss-cheat-sheets
Executable XSS cheat sheets for popular web frameworks | Semgrep
We’re big fans of the OWASP Cheat Sheet Series, one of the flagship OWASP projects. The series includes detailed information on all kinds of security issues and is an outstanding reference and educational tool. We developed these cheat sheets to check for code patterns of potential XSS (cross ...
🌐
Opencre
opencre.org › node › standard › OWASP Cheat Sheets › section › DOM based XSS Prevention Cheat Sheet
DOM based XSS Prevention Cheat Sheet
Open CRE - Open Cybersecurity Requirement Expression: Link security requirements across standards and frameworks.