--- title: "JavaScript Execution XS Leak" section: "Web Pentesting" sectionSlug: "pentesting-web" sourcePath: "src/pentesting-web/xs-search/javascript-execution-xs-leak.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/pentesting-web/xs-search/javascript-execution-xs-leak.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0" --- # JavaScript Execution XS Leak This XS-Search primitive turns **whether a cross-origin response executes as JavaScript** into a **Boolean oracle**.[[1]](#references) The usual setup is: - **Positive state**: the target returns attacker-controlled text or sensitive content that does **not** execute as attacker JavaScript. - **Negative state**: the target reflects attacker-controlled text into a place that is parsed as valid JavaScript, so the attacker can force a callback such as `window.parent.foo()`. - **Leak**: load the target with a classic `
hello2