Xss browser confirm

From vigolium/vigolium · View interactive version

Xss browser confirm is an AI agent skill from the GitHub repository vigolium/vigolium. Turn a suspected Cross-Site Scripting reflection or DOM sink into proof of JavaScript execution by firing a uniquely-tagged dialog in a real headless browser via the browser_probe tool — not by string-matching the response. Covers reflected, stored, and DOM-based XSS, context-aware payload crafting

How to use this skill

Skill file

XSS → Browser-Confirmed Execution

You suspect XSS somewhere. Reflection is a hint, not proof. Your job is to

make JavaScript actually run in a real browser and capture the proof —

then persist a finding with the exact URL that executed. browser_probe

loads a URL in headless Chrome and reports any alert/confirm/prompt

dialog that fires, even when nothing reflects visibly in the HTML. That

dialog is your oracle.

When this skill applies

observed, execution unconfirmed".

document.write, eval, setTimeout(string), location/href,

$(...).html(), dangerouslySetInnerHTML.

If you only have "fuzz everything", anchor on a record first

(query_records for reflected params / search endpoints, then

inspect_record). Don't probe blind.

The canary discipline

Use one unique canary per probe so a dialog can't be a coincidence or a

leftover from another page. Make it specific and greppable, e.g.

alert('xss-9f3a2c'). After browser_probe, the proof is

dialog_fired == true and the dialog message equals your canary. A

dialog with a different message is the app's own JS — not your finding.

remember the canary + target as xss-target so it survives context churn.

Workflow

1. Anchor and find the reflection / sink

inspect_record the candidate. Find where the input lands:

JS to find the sink and the source (location.hash, location.search,

document.referrer, postMessage).

panel) → stored; note the injection request and the rendering URL.

2. Classify the injection context

The payload must break out of its context. Identify which one:

or, if <script> is stripped, <img src=x onerror=alert('c')>.

"><img src=x onerror=alert('c')> or, inside an event-capable tag,

" onmouseover=alert('c') autofocus tabindex=1 x=".

';alert('c')// or </script><script>alert('c')</script>.

javascript:alert('c').

the fragment — #<img src=x onerror=alert('c')> — see step 4.

3. Confirm reflected XSS

Build the full URL with the payload in the query string and call

browser_probe:

setTimeout-wrapped sinks); the default 700 misses late dialogs.

Read the result: dialog_fired:true + message == canary → confirmed.

If the value reflects in the HTML but no dialog fires, it's reflected-only

(likely encoded or CSP-blocked) — go to step 6, don't report yet.

4. Confirm DOM-based XSS

DOM XSS often lives in the fragment, which the server never sees (so

server-side reflection and WAFs are blind to it). Put the payload after #:

#javascript:alert('c') for a location sink).

innerHTML = location.hash fires the dialog. No dialog → the sink sanitizes

or the source isn't what you think; re-read the JS.

5. Confirm stored XSS

Two steps:

  1. replay_request the write that persists your payload (post a comment,

update a profile field) with the canary payload in the stored field.

  1. browser_probe the rendering page (where the stored value is shown,

often an admin/other-user view). Dialog fires there → stored XSS, which is

higher impact than reflected (no user interaction / victim is whoever

views the page).

Note the rendering context in the finding — "fires in the admin moderation

queue" is materially worse than "fires on the author's own page".

6. Reflected-but-not-executing: light evasion

If the payload reflects but no dialog fires, the value is encoded, filtered,

or CSP-blocked. Iterate a few targeted variants — don't brute force:

<img src=x onerror=alert('c')> when script is filtered.

keywords; match the encoding to where reflection lands.

isn't.

with no unsafe-inline, inline handlers won't run. Note the CSP — it can

downgrade or block the finding; an injection that can't execute under the

deployed CSP is at most informational. Look for a CSP bypass (allowed CDN,

nonce reuse, JSONP endpoint) before claiming execution.

Re-browser_probe after each variant. Stop after a handful; if nothing

fires, report it as reflection-only (low/informational) with the encoding

you observed, not as confirmed XSS.

7. Persist the finding

report_finding once per distinct sink:

with execution → high; reflection-only / CSP-blocked → low or

informational.

/search?q executes arbitrary JS" or "DOM XSS via location.hash →

innerHTML on /dashboard"`.

fired alert(<canary>), and the rendering context for stored XSS.

that fired the dialog — this is the reproducible proof.

If the audit harness already filed a theoretical XSS for the same sink,

update_finding with status: triaged and the browser-confirmed evidence

instead of double-reporting.

Pitfalls — read before claiming

The dialog from browser_probe is the bar.

app's own code; keep the canary unique per probe.

setTimeout/requestAnimationFrame won't fire within the default window.

server logs won't show it — that's expected; the browser still executes it.

whether inline execution is actually allowed before sizing the finding.

Output expectations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.