🌐
PortSwigger
portswigger.net › web-security › cross-site-scripting › dom-based
What is DOM-based XSS (cross-site scripting)? Tutorial & Examples | Web Security Academy
In this section, we'll describe DOM-based cross-site scripting (DOM XSS), explain how to find DOM XSS vulnerabilities, and talk about how to exploit DOM XSS with different sources and sinks.
🌐
OWASP Foundation
owasp.org › www-community › attacks › DOM_Based_XSS
DOM Based XSS | OWASP Foundation
[1] “DOM Based Cross Site Scripting or XSS of the Third Kind” (WASC writeup), Amit Klein, July 2005
People also ask

What is DOM-based XSS?
DOM-based cross-site scripting is a type of cross-site scripting (XSS) attack executed within the Document Object Model (DOM) of a page loaded into the browser. A DOM-based XSS attack is possible if the web application writes data to the DOM without proper sanitization. · Learn more about types of cross-site scripting attacks
🌐
invicti.com
invicti.com › learn › dom-based-cross-site-scripting-dom-xss
DOM-Based Cross-Site Scripting (DOM XSS)
How to avoid DOM-based XSS vulnerabilities?
To avoid DOM-based XSS, you should avoid using data received from the client for client-side sensitive actions and sanitize client-side code by inspecting references to DOM objects that pose a threat, for example, URL, location, and referrer. Read about DOM-based XSS vulnerabilities in popular websites and web applications.
🌐
acunetix.com
acunetix.com › blog › articles › dom-xss-explained
DOM XSS: An Explanation of DOM-based Cross-site Scripting | Acunetix
What are DOM-based XSS vulnerabilities?
DOM-based XSS vulnerabilities are a type of Cross-site Scripting (XSS) vulnerabilities. A DOM-based XSS attack is possible if the web application writes data to the Document Object Model (DOM) without proper sanitization. The attacker can manipulate this data to include, for example, malicious JavaScript code. Learn more about all types of Cross-site scripting attacks.
🌐
acunetix.com
acunetix.com › blog › articles › dom-xss-explained
DOM XSS: An Explanation of DOM-based Cross-site Scripting | Acunetix
🌐
GitHub
github.com › Sudistark › xss-writeups › blob › main › figma.com-xss.md
xss-writeups/figma.com-xss.md at main · Sudistark/xss-writeups
Recently I was able to find a DOM based xss in www.figma.com in collaboration with @huli (an awesome ctf player).
Author   Sudistark
🌐
Snyk Learn
learn.snyk.io › home › security education › dom based xss | tutorial & examples | snyk learn
DOM Based XSS | Tutorial & Examples | Snyk Learn | Snyk Learn
July 18, 2022 - DOM XSS is a web application vulnerability that allows attackers to manipulate the DOM environment in a user's browser by injecting malicious client-side code. DOM XSS vulnerabilities are mainly attributed to situations where user-controllable ...
🌐
Invicti
invicti.com › learn › dom-based-cross-site-scripting-dom-xss
DOM-Based Cross-Site Scripting (DOM XSS)
The best way to completely avoid DOM-based XSS vulnerabilities in your JavaScript code is to use the correct output method (a safe sink). For example, if you want to write into a <div> element, don’t use innerHtml.
🌐
writeups
svennergr.github.io › writeups › google › ads_dom_xss
Stumbling across a DOM XSS on google.com | writeups
This is a short writeup about a DOM XSS on google.com which I accidentally discovered.
🌐
OWASP Cheat Sheet Series
cheatsheetseries.owasp.org › cheatsheets › DOM_based_XSS_Prevention_Cheat_Sheet.html
DOM based XSS Prevention - OWASP Cheat Sheet Series
This is because the rule to HTML attribute encode in an HTML attribute rendering context is necessary in order to mitigate attacks which try to exit out of an HTML attributes or try to add additional attributes which could lead to XSS. When you are in a DOM execution context you only need to JavaScript encode HTML attributes which do not execute code (attributes other than event handler, CSS, and URL attributes).
Find elsewhere
🌐
Acunetix
acunetix.com › blog › articles › dom-xss-explained
DOM XSS: An Explanation of DOM-based Cross-site Scripting | Acunetix
February 19, 2025 - An attacker may use several DOM objects to create a Cross-site Scripting attack. The most popular objects from this perspective are document.url, document.location, and document.referrer. Potential consequences of DOM-based XSS vulnerabilities are classified in the OWASP Top 10 2017 document as moderate.
🌐
PortSwigger
portswigger.net › web-security › cross-site-scripting › dom-based › lab-document-write-sink
Lab: DOM XSS in document.write sink using source location.search | Web Security Academy
This lab contains a DOM-based cross-site scripting vulnerability in the search query tracking functionality. It uses the JavaScript document.write function, which writes data out to the page.
🌐
HackerOne
hackerone.com › reports › 168165
SecNews disclosed on HackerOne: DOM based XSS in search functionality
When researchers don't understand english well, it's inconvenient, but at least it only hurts themselves. When the security team is not good at english, unfortunately it hurts all the researches.
🌐
Medium
medium.com › @youssefla › dom-xss-walkthrough-4d60c45ffb21
DOM XSS Walkthrough. Introduction : | by Youssef Lahouifi | Medium
May 6, 2020 - DOM XSS Walkthrough Introduction : I was checking my email and i found a DOM XSS vulnerability that I have reported to a program long time ago which isn’t patched yet , and i thought why not …
🌐
Intigriti
intigriti.com › blog › hacking tools › hunting for dom-based xss vulnerabilities: a complete guide
Hunting for DOM-based XSS vulnerabilities: A complete guide
November 11, 2025 - DOM sources are JavaScript properties that contain user-controllable data, which attackers can manipulate (typically through the URL). Below is a comprehensive list of all possible entry points for DOM-based XSS attacks:
🌐
Payatu
payatu.com › home › how dom-based cross-site scripting (xss) attack works
How DOM-based Cross-Site Scripting (XSS) Attack Works
April 19, 2024 - First Example→DOM XSS in document.write sink using source location.search1) We will search some random string to check where our input is reflected on the next page.2) After clicking on search, we go to the page source.
🌐
Feroot Security
feroot.com › education-center › what-is-dom-based-xss
What is DOM-based XSS? | Feroot
June 18, 2025 - Search-ready snippet: DOM-based XSS manipulates client-side JavaScript and DOM objects to inject malicious scripts directly in the browser.
🌐
HackTricks
book.hacktricks.xyz › home › pentesting web › xss cross site scripting › dom xss
DOM XSS - HackTricks
This kind of XSS is probably the hardest to find, as you need to look inside the JS code, see if it’s using any object whose value you control, and in that case, see if there is any way to abuse it to execute arbitrary JS. https://github.com/mozilla/eslint-plugin-no-unsanitized · Browser extension to check every data taht reaches a potential sink: https://github.com/kevin-mizu/domloggerpp
🌐
Medium
medium.com › @haroonhameed_76621 › dom-based-xss-for-fun-and-profit-bug-bounty-poc-f4b9554e95d
DOM-Based XSS for fun and profit $$$! | Bug Bounty POC | by Haroon Hameed | Medium
February 16, 2025 - The following are some demonstration payloads which can be used to execute JavaScript commands and access DOM elements, such as document.domain and document.cookie:
🌐
Vaadata
vaadata.com › home › technical › dom-based xss attacks: principles, impacts, exploitations and security best practices
DOM XSS: principles, exploitations, security best practices
October 4, 2023 - The first of these two features is the most important for detecting a classic DOM-based XSS. The extension is able to inject a user-defined string into all possible sources or only into the URL. It will then report the sources and sinks where this string is found.
🌐
kuldeepdotexe's blog
kuldeep.io › posts › fulldisclosure-dom-based-xss
Full Disclosure - DOM-based XSS And Failures In Bug Bounty Hunting :: kuldeepdotexe's blog
July 6, 2023 - Since this value comes from the user and is not validated or sanitized before use, an attacker could manipulate this value to point to a malicious script on a different server. When the jQuery getScript() function fetches and executes this script, it would run in the context of the user’s session, leading to a DOM-based Cross-Site Scripting (XSS) attack.