Repository navigation
Extensions
Extensions are small JavaScript modules that ezXSS merges into the payload it serves. Use them to collect extra data or run your own logic on the tested page without touching the core payload - reusable plugins that sit on top of the standard payload.
When a blind-XSS injection fires, your payload runs on the vulnerable page, collects data, and sends a report back. An extension's code is concatenated into that payload, so it can read and add to the data before it's sent. A few stable helpers are available to you:
-
ez_a(...)- attach your own fields to the report:// One field ez_a('note', 'extension ran here'); // Or several at once ez_a({ framework: 'wordpress', adminArea: location.pathname });
Anything you add shows up in the report's extra-data section. See Reports.
-
ez_rD- the report-data object the payload is building. -
ez_*- the payload's internal helpers. These names stay stable across releases, so you can call or override them.
Your code is injected after the ez_* helpers exist but before the payload collects and sends, so you can define helpers, override existing ones, or register data first.
Extensions live under Settings -> Extensions (needs the settings.manage permission, so admins and users granted it). See Users and permissions.

The tab lets you add an extension (blank, or from a GitHub repo or Gist), see every installed extension with an enabled toggle, and open the editor.
- Enable it. Flip the Enabled toggle in the table. New and freshly installed extensions start disabled so nothing goes live by accident.
-
Select where it applies:
- Globally - under Settings -> Payload defaults -> Injected extensions. Merged into every payload, including the catch-all served when no specific payload matches.
- Per payload - in a single payload's own editor on the Payloads screen. Applies to that payload only.
There's also an instance-wide master switch at Settings -> Payload defaults -> Allowed behaviour -> Extensions. While it's off, no extension is injected anywhere, whatever its own state. See Configuration.
Heads up: during the merge, ezXSS strips every line starting with
//, so single-line comments don't survive into the served payload. Use block comments (/* ... */) for inline notes.
- Go to Settings -> Extensions, click Create blank.
- The editor opens on a new (disabled) extension. Fill in the name, description, version and author, and write your code. Everything auto-saves.
- Flip Enabled in the table, then select it globally or per payload.
A minimal example that records which page the payload ran on:
try {
ez_a({
path: location.pathname,
title: document.title
});
} catch (e) { /* keep a failing extension from stopping the core payload */ }Wrap your logic in try/catch so a broken extension can't stop the rest of the payload from sending its report.
Hand-written extensions keep their metadata in the form fields. A shared .js file (GitHub or Gist) instead carries a fixed header block at the top so the installer can read it:
// <ezXSS extension>
// @name Example extension
// @description Short description of what this extension does
// @author Your name
// @version 1.0
// </ezXSS extension>
// Everything below the close marker is the extension body.
ez_a('example', true);The @name, @description, @author and @version lines must appear in that order between the two markers. Files with a malformed header are skipped.
A community collection lives at https://github.com/ssl/ezXSS-extensions.
Paste a URL into the field under Add an extension and click Install:
https://github.com/<user>/<repo> # every suitable .js file in the repo root
https://github.com/<user>/<repo>/blob/<branch>/<file>.js # just that one file
https://github.com/proxy/gist.github.com/<user>/<id> # the single file behind a Gist
Installed extensions always start disabled, and files already installed are skipped. Only public GitHub repos and Gists work; other hosts are rejected.
Extensions are code that runs inside your payloads. Review anything you install from a third party before enabling it, like any dependency.
Extensions installed from GitHub or a Gist remember their source. Click Check update to compare your copy against the current remote file; if they differ you get a side-by-side diff and can Apply update to overwrite yours. Note this wipes any local edits you made. Extensions you wrote yourself (source Custom) have no remote and no update check.
Extensions can also be managed through the REST API. Every endpoint needs authentication and the settings.manage permission.
| Method & path | Purpose |
|---|---|
GET /api/extensions |
List all extensions (no code) |
POST /api/extensions |
Create an extension |
GET /api/extensions/get/{id} |
Fetch one, including its code |
POST /api/extensions/update/{id} |
Update fields (name, description, version, author, code, enabled) |
DELETE /api/extensions/delete/{id} |
Delete an extension |
POST /api/extensions/toggle/{id} |
Flip the enabled flag |
POST /api/extensions/install |
Install from a GitHub/Gist URL ({ "url": "..." }) |
GET /api/extensions/remote/{id} |
Check the remote source, return a diff |
POST /api/extensions/remote/{id} |
Apply the remote version |
# List all extensions
curl -H "Authorization: Bearer <token>" https://your-ezxss-domain/api/extensions
# Install from GitHub
curl -X POST -H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{ "url": "https://github.com/ssl/ezXSS-extensions" }' \
https://your-ezxss-domain/api/extensions/install- Not showing up in reports. Check the master switch is on, the extension is enabled, and it's selected globally or on the payload. Re-request the payload to pick up the change.
-
My
//comments disappeared. Expected -//lines are stripped during the merge. Use/* ... */. -
One extension broke the whole payload. An uncaught error stops later code. Wrap your logic in
try/catch. - Install says the URL is invalid or forbidden. Only public GitHub repos and Gists are supported.
- GitHub extension edits keep reverting. Applying a remote update overwrites local edits. Keep your changes as a separate Custom extension instead.